You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following 7f756de, it became possible for a client to directly add keybindings to the underlying CodeMirror instance. The 'ArrowUp' and 'ArrowDown' keybindings only fire when the cursor is at the edge of the document (that is to say, when pressing the key would no longer affect the position of the cursor).
In order for proper up-arrowing through history in command input, these keybindings should take precedence over moving the cursor.
The text was updated successfully, but these errors were encountered:
The solution used in TU-Editor is the same one I'm employing in Galapagos, namely, using the OnKeyUp option of the GalapagosEditor constructor. I am referring to this. The OnKeyUp option works fine for both Galapagos and evidently TU-Editor as well, but this issue is about the KeyBindings option.
One of the symptoms of using OnKeyUp is that both Galapagos and TU-Editor suffer from the issue that the handler only fires after the key is released, not after it is pressed. The reason for adding the KeyBindings option in the first place was to mitigate effects such as this by providing a cleaner way to add key bindings. Thus, the original issue stands, that setting the option to something like KeyBindings: [{ key: 'ArrowUp', run: handler }] only works some of the time, making it unsuitable for up-arrowing through history.
However, given that the small delay imposed by using OnKeyUp doesn't prevent it from being a viable alternative, this issue is probably not a high priority.
Following 7f756de, it became possible for a client to directly add keybindings to the underlying CodeMirror instance. The 'ArrowUp' and 'ArrowDown' keybindings only fire when the cursor is at the edge of the document (that is to say, when pressing the key would no longer affect the position of the cursor).
In order for proper up-arrowing through history in command input, these keybindings should take precedence over moving the cursor.
The text was updated successfully, but these errors were encountered: