changeset 2013:0f14207596b3 default tip

swing
author Franklin Schmidt <fschmidt@gmail.com>
date Sun, 14 Sep 2025 18:04:00 -0600
parents 72e9624a21d3
children
files src/luan/modules/swing/TextAreaLineNumbersLuan.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/luan/modules/swing/TextAreaLineNumbersLuan.java	Sat Sep 06 14:47:09 2025 -0600
+++ b/src/luan/modules/swing/TextAreaLineNumbersLuan.java	Sun Sep 14 18:04:00 2025 -0600
@@ -162,6 +162,10 @@
 				} catch(BadLocationException e) {
 					throw new RuntimeException(e);
 				}
+				if( event.isShiftDown() ) {
+					start = Math.min( start, textArea.getSelectionStart() );
+					end = Math.max( end, textArea.getSelectionEnd() );
+				}
 				textArea.setCaretPosition(start);
 				textArea.moveCaretPosition(end);
 				textArea.requestFocusInWindow();