[accerciser/gnome-3-34] IPython: fixed the character loss during autocompletion



commit 5c6b45dee372de1267005710a69b25f77b68e5df
Author: Rok Mandeljc <rok mandeljc gmail com>
Date:   Thu Apr 16 20:37:19 2020 +0200

    IPython: fixed the character loss during autocompletion
    
    Due to a typo in variable name, certain autocomplete attempts
    resulted in only the last character of the input line being
    preserved (e.g., "pr" + tab would result in "r").

 plugins/ipython_view.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/plugins/ipython_view.py b/plugins/ipython_view.py
index c8f6a71..e03b70f 100755
--- a/plugins/ipython_view.py
+++ b/plugins/ipython_view.py
@@ -322,7 +322,7 @@ class IterableIPShell:
             return str1[:i]
         return str1
       if possibilities[1]:
-        common_prefix = reduce(_commonPrefix, possibilities[1]) or line[-1]
+        common_prefix = reduce(_commonPrefix, possibilities[1]) or split_line[-1]
         completed = line[:-len(split_line[-1])]+common_prefix
       else:
         completed = line


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]