Comments (6)
On Linux
- Scrolling fires the "Up" & "Down" events, same as using those buttons on the keyboard.
On Windows
- No events are fired, but there is supposed to be.
Investigations :
I tried getting Mouse Events instead of key events inside the project with no luck, I then tried in an empty project with only termimad
and I didn't succeed either. I then directly tried with crossterm and it worked, firing ScrollDown
& ScrollUp
After some investigation you have to :
// Have to do this part because of crossterm
let mut stdout = io::stdout();
execute!(
stdout,
EnableMouseCapture, // termimad::crossterm::event::EnableMouseCapture
)?;
// Have to do this part because of crossterm`
And then match the events :
#[cfg(windows)]
Event::Mouse(mouse_event) => {
let key_code =
match mouse_event.kind {
MouseEventKind::ScrollDown => {KeyCode::Down}
MouseEventKind::ScrollUp => {KeyCode::Up}
_ => {KeyCode::Null}
};
action = keybindings.get(KeyEvent::new(key_code,KeyModifiers::NONE));
}
#[cfg(not(windows))]
_ => {}
If this is going to be merged :
I created an action using Down
and Up
to try to stay coherent to the rest.
And I will welcome some feedback to have something cleaner especially regarding the crossterm part with EnableMouseCapture
.
from bacon.
vscode ? Is that issue related to bacon ?
If it is, then yes, you should be able to use the mouse wheel to scroll the report in bacon.
from bacon.
I'm on Windows, and I tried in Git Bash, CMD and powershell and I still have the same issue outside of vscode this time
from bacon.
Thanks for the investigation. I should have rememembered this myself as I had the problem before in broot.
Regarding your code, I'll comment on the PR
from bacon.
Now fixed in 2.13.0
from bacon.
Related Issues (20)
- Screen doesn't clear when running on quiet mode HOT 5
- nexttest in bacon won't scroll output HOT 3
- "bacon test -- -p some_package" doesn't work HOT 6
- Run Job doesn't clear .bacon-locations when no errors are present HOT 2
- [Bug] `bacon test` doesn't let you scroll its output when there are failed tests HOT 14
- `bacon test` with something like `insta` can endlessly trigger re-runs HOT 5
- [feature request] some binding to show quick summary of toolchain used for job HOT 2
- Feature request: look for bacon.toml in workspace root HOT 3
- working with just HOT 3
- Add environment vars to config HOT 3
- Q/FR: More than one command per job HOT 12
- Showing only one error/warning per page HOT 2
- says there is 2 warnings when there is just one
- Publish binaries to github releases HOT 8
- Offline mode does not see path dependency changes HOT 1
- Default `bacon.toml` overrides `prefs.toml` configured jobs HOT 2
- Using `bacon` with `rust-analyzer` in VS Code HOT 4
- Screen doesn't clear when the file watcher restarts a long-running job HOT 8
- run tests with `-- --nocapture` option HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bacon.