AlloyTools / org.alloytools.alloy

Alloy is a language for describing structures and a tool for exploring them. It has been used in a wide range of applications from finding holes in security mechanisms to designing telephone switching networks. This repository contains the code for the tool.
Other
694 stars 123 forks source link

Editor pane goes crazy after hitting Ctrl+Shift+O #257

Closed grayswandyr closed 2 months ago

grayswandyr commented 2 months ago

This issue is present in (at least) A6 and A6.1-alpha, at least on Linux. Take the following edition: image

After hitting Ctrl+Shift+O, the edition frame goes blank (and Ctrl+Z doesn't seem to bring it back). Behind the scene, it seems characters are taken into account since the line and column counters change if some text is input. image

Users might lose a model because of a bad keystroke.

nmacedo commented 2 months ago

I can't find that shortcut on the source code (nor on the macos GUI), what was it supposed to do?

grayswandyr commented 2 months ago

Nothing that I know :-) I typed it mistakenly and it blew my model away. And Undo doesn't fix this.

nmacedo commented 2 months ago

Ok, after some digging it seems like that is a shortcut from swing's JTextPane that toggles the orientation of the component. Why it is causing that weird behaviour in the Analyzer is beyond my expertise, what I can do is just disable that shortcut :)

grayswandyr commented 2 months ago

Looks safer!