Commit 938109d
committed
Fix selection bug in handleMoveLines on macOS by using invokeLater()
Previously, moving lines down on macOS caused incorrect selection, moving
the cursor to the end of the enclosing braces instead of properly selecting the moved line. This issue did not occur on Windows.
The fix ensures that selection updates happen inside Swing's event
dispatch thread by wrapping the selection logic in SwingUtilities.invokeLater().
This guarantees proper selection behavior across all platforms.
Additionally, updated the JavaDoc for the method to reflect the fix and clarify
the behavior of the selection update.
Tested on Windows and macOS.1 parent 34cc438 commit 938109d
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1936 | 1936 | | |
1937 | 1937 | | |
1938 | 1938 | | |
| 1939 | + | |
| 1940 | + | |
1939 | 1941 | | |
1940 | 1942 | | |
1941 | 1943 | | |
| |||
2005 | 2007 | | |
2006 | 2008 | | |
2007 | 2009 | | |
2008 | | - | |
| 2010 | + | |
2009 | 2011 | | |
2010 | 2012 | | |
2011 | 2013 | | |
| |||
0 commit comments