mirror of
https://github.com/processing/processing4.git
synced 2026-02-11 17:40:48 +01:00
handle next/prev line with up/down arrow with/without shift
This commit is contained in:
@@ -786,8 +786,14 @@ public abstract class InputHandler extends KeyAdapter
|
||||
|
||||
if(line == textArea.getLineCount() - 1)
|
||||
{
|
||||
textArea.getToolkit().beep();
|
||||
return;
|
||||
//textArea.getToolkit().beep();
|
||||
int doc = textArea.getDocumentLength();
|
||||
if (select) {
|
||||
textArea.select(textArea.getMarkPosition(), doc);
|
||||
} else {
|
||||
textArea.setCaretPosition(doc);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int magic = textArea.getMagicCaretPosition();
|
||||
@@ -944,7 +950,14 @@ public abstract class InputHandler extends KeyAdapter
|
||||
|
||||
if(line == 0)
|
||||
{
|
||||
textArea.getToolkit().beep();
|
||||
if (select) {
|
||||
if (textArea.getSelectionStart() != 0) {
|
||||
textArea.select(textArea.getMarkPosition(), 0);
|
||||
}
|
||||
} else {
|
||||
textArea.setCaretPosition(0);
|
||||
}
|
||||
//textArea.getToolkit().beep();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user