From 50a4b393f7a5e30908d9591f3eb9343ae6861a0b Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 23 Apr 2011 16:56:32 +0000 Subject: Reverted a jline commit which had broken histor... Reverted a jline commit which had broken history search, no review. --- src/jline/project/plugins/project/build.properties | 2 +- .../java/scala/tools/jline/TerminalSupport.java | 10 +--- .../scala/tools/jline/console/ConsoleReader.java | 2 +- .../scala/tools/jline/macbindings.properties | 62 ---------------------- 4 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 src/jline/src/main/resources/scala/tools/jline/macbindings.properties (limited to 'src/jline') diff --git a/src/jline/project/plugins/project/build.properties b/src/jline/project/plugins/project/build.properties index 24481fef8e..218ed2577f 100644 --- a/src/jline/project/plugins/project/build.properties +++ b/src/jline/project/plugins/project/build.properties @@ -1,3 +1,3 @@ #Project properties -#Tue Apr 05 12:32:56 PDT 2011 +#Wed Mar 23 21:05:33 PDT 2011 plugin.uptodate=true diff --git a/src/jline/src/main/java/scala/tools/jline/TerminalSupport.java b/src/jline/src/main/java/scala/tools/jline/TerminalSupport.java index 03004fea68..1ca12cb73f 100644 --- a/src/jline/src/main/java/scala/tools/jline/TerminalSupport.java +++ b/src/jline/src/main/java/scala/tools/jline/TerminalSupport.java @@ -24,10 +24,6 @@ public abstract class TerminalSupport implements Terminal { public static String DEFAULT_KEYBINDINGS_PROPERTIES = "keybindings.properties"; - public static String DEFAULT_KEYBINDINGS_PROPERTIES_MAC = "macbindings.properties"; - public static boolean isMac() { - return System.getProperty("os.name").toLowerCase().startsWith("mac"); - } public static final String JLINE_SHUTDOWNHOOK = "jline.shutdownhook"; @@ -161,11 +157,7 @@ public abstract class TerminalSupport } public InputStream getDefaultBindings() { - // Mac bindings are slightly different from Unix/Linux. - // For instance, the Delete key behavior is different between them. - return TerminalSupport.class.getResourceAsStream( - isMac() ? DEFAULT_KEYBINDINGS_PROPERTIES_MAC : DEFAULT_KEYBINDINGS_PROPERTIES - ); + return TerminalSupport.class.getResourceAsStream(DEFAULT_KEYBINDINGS_PROPERTIES); } // diff --git a/src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java b/src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java index 5e6f5c166a..f493619bcd 100644 --- a/src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java +++ b/src/jline/src/main/java/scala/tools/jline/console/ConsoleReader.java @@ -1283,7 +1283,7 @@ public class ConsoleReader if (buf.buffer.length() == 0) { return null; } else { - success = deleteCurrentCharacter(); + deleteCurrentCharacter(); } break; diff --git a/src/jline/src/main/resources/scala/tools/jline/macbindings.properties b/src/jline/src/main/resources/scala/tools/jline/macbindings.properties deleted file mode 100644 index 8e810a8364..0000000000 --- a/src/jline/src/main/resources/scala/tools/jline/macbindings.properties +++ /dev/null @@ -1,62 +0,0 @@ -# Keybinding mapping for JLine. The format is: -# [key code]: [logical operation] - -# CTRL-B: move to the previous character -2: PREV_CHAR - -# CTRL-G: move to the previous word -7: PREV_WORD - -# CTRL-F: move to the next character -6: NEXT_CHAR - -# CTRL-A: move to the beginning of the line -1: MOVE_TO_BEG - -# CTRL-D: close out the input stream -4: EXIT - -# CTRL-E: move the cursor to the end of the line -5: MOVE_TO_END - -# BACKSPACE, CTRL-H: delete the previous character -# 8 is the ASCII code for backspace and therefor -# deleting the previous character -8: DELETE_PREV_CHAR - -# TAB, CTRL-I: signal that console completion should be attempted -9: COMPLETE - -# CTRL-J, CTRL-M: newline -10: NEWLINE - -# CTRL-K: erase the current line -11: KILL_LINE - -# ENTER: newline -13: NEWLINE - -# CTRL-L: clear screen -12: CLEAR_SCREEN - -# CTRL-N: scroll to the next element in the history buffer -14: NEXT_HISTORY - -# CTRL-P: scroll to the previous element in the history buffer -16: PREV_HISTORY - -# CTRL-R: redraw the current line -18: REDISPLAY - -# CTRL-U: delete all the characters before the cursor position -21: KILL_LINE_PREV - -# CTRL-V: paste the contents of the clipboard (useful for Windows terminal) -22: PASTE - -# CTRL-W: delete the word directly before the cursor -23: DELETE_PREV_WORD - -# DELETE, CTRL-?: delete the previous character -# 127 is the ASCII code for delete -127: DELETE_NEXT_CHAR -- cgit v1.2.3