uiua-lang / uiua

A stack-based array programming language
https://www.uiua.org
MIT License
1.51k stars 106 forks source link

fix(editor): common macos shortcuts for next and previous respected #513

Closed joncfoo closed 2 months ago

joncfoo commented 2 months ago

Problem:

On macOS, next and previous tab for documents/tabs within applications are bound to Cmd-Shift-[ and Cmd-Shift-]. Pressing these while in the editor changes tabs but invokes the delimiter insertion code leaving behind unwanted delimiters when coming back to the editor.

Solution:

Only run the delimiter handling code if the Cmd button is not pressed. This is detectable via use of the meta key in the browser.