summaryrefslogtreecommitdiff
path: root/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java
blob: 601aa2a65a2fc42bf9113682139d123be0385b8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- src/org/gnu/readline/Readline.java.orig	2003-01-07 11:14:35.000000000 +0100
+++ src/org/gnu/readline/Readline.java	2007-09-27 08:52:01.000000000 +0200
@@ -568,6 +568,31 @@
   /////////////////////////////////////////////////////////////////////////////
 
   /**
+     Query and set the completion append character. You might need
+     this in a {@link ReadlineCompleter} implementation. The argument
+     appendCharacter should be in the ASCII range.
+
+     <p>Supporting implementations:
+        <ul>
+	  <li>GNU-Readline</li>
+	  <li>Editline</li>
+        </ul>
+     </p>
+
+  */
+    
+  public static char setCompletionAppendCharacter(char appendCharacter) {
+    if (iLib == ReadlineLibrary.GnuReadline || iLib == ReadlineLibrary.Editline)
+      return setCompletionAppendCharacterImpl(appendCharacter);
+    else if (iThrowException)
+      throw new UnsupportedOperationException();
+    else
+      return '\uFFFF';
+  }
+
+  /////////////////////////////////////////////////////////////////////////////
+
+  /**
      Query the current line buffer. This returns the current content of
      the internal line buffer. You might need this in a 
      {@link ReadlineCompleter} implementation to access the full text
@@ -838,4 +863,17 @@
   private native static void 
     setWordBreakCharactersImpl(String wordBreakCharacters)
                               throws UnsupportedEncodingException;
+
+  /////////////////////////////////////////////////////////////////////////////
+
+  /**
+     Native implementation of setCompletionAppendCharacter()
+
+     @see 
+   org.gnu.readline.Readline#setCompletionAppendCharacter(char appendCharacter)
+  */
+
+  private native static char 
+    setCompletionAppendCharacterImpl(char appendCharacter);
+
 }