Comments (4)
This is an odd OSX thing; http://osxnotes.net/keybindings.html describes two actions in a row for these keybindings ("~\Uf700"
and "~\Uf701"
). I think it's done this way so repeatedly pressing the key makes progress through the document.
How to deal with it? One possibility is to place a very short timeout on updates, aggregating them if they fall within the timer. I wouldn't do it for just this issue, but it's also very much an issue for color flickering when the plugin is doing syntax highlighting. I think if that can get its answer back in a ms or so, it's worth taking the small latency hit to avoid flickering.
That can be done either in the front-end or the core, but I lean toward the latter for two reasons. First, the need is common to all front-ends (as long as we're talking about syntax color and not just this specific issue
If it were just this issue, it's probably possible to override the keybinding to send a single command with the combined effect. But that might have negative consequences for users customizing their keybindings, and I'm inclined to try to solve the more general problem.
Good catch!
from xi-mac.
Interesting.
I've been thinking a lot about keybindings in the last day or two, and I've come to assume that at some point we would stop relying on the interpreted NSResponder events and start sending raw events to the core. (At least, this is the only good way I can imagine implementing modal editing, and I think it also has some merit for certain a certain category of particularly ambitious plugin; again this is far future; but basically I've been imagining a modular system that sits between the client and the main dispatcher, receiving raw key events and outputting edit/other commands, maybe implemented as an FSM; this module could either be part of xi-core or a plugin communicating via json-rpc, which would let people experiment with novel modal (or not) editing paradigms).
Obviously we would want to do this in a way that didn't compromise IME support. There will probably have to be platform-specific accommodations of some kind? You'll have a much better sense of this then most of us.
My first thought about this discreet problem is that we can probably intercept the raw key event in keyDown(with:) and manually send the appropriate movement event; I'll take a look and see if it's a quick fix.
from xi-mac.
Status bump?
from xi-mac.
Although I don't believe we added a concrete fix, it does look like at least the flickering has been resolved, probably because of the delayed rendering stuff in xi-editor/xi-editor#626. Since this was really a UI issue, I think that fix is acceptable.
from xi-mac.
Related Issues (20)
- autosave triggers HOT 11
- Xcode colorscheme HOT 3
- xi --wait does not return after application exit HOT 1
- update to swift 5 HOT 9
- Doesn't compile for Swift 5 HOT 13
- Change default find highlight color HOT 2
- package ID specification `xi-syntect-plugin` matched no packages
- build-rust-xcode.sh fails with Permission denied (os error 13) HOT 6
- Status Bar hiding last line HOT 3
- Scroll bars disappearing when switching from different application HOT 3
- Drag events cause file to be opened HOT 1
- Wrong top margin with statusbar -- first visible line is not rendered
- Crash when deleting (backspace) selection HOT 2
- Line numbers become bogus when scrolling HOT 1
- xcodebuild error (Xcode 11.3.1) HOT 14
- (Save) Dialog Overshoots Window in Splitwindow mode (macOS Catalina)
- Where is built .app? HOT 1
- No text is displayed at all
- no such module 'ArgumentParser' HOT 9
- xcodebuild fails on Mac Version OS 12 HOT 1
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 xi-mac.