emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r107346: Check FROM arg to substring


From: Leo Liu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r107346: Check FROM arg to substring in icomplete-completions
Date: Mon, 20 Feb 2012 16:06:52 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107346
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Mon 2012-02-20 16:06:52 +0800
message:
  Check FROM arg to substring in icomplete-completions
  
  See: http://debbugs.gnu.org/10850
modified:
  lisp/ChangeLog
  lisp/icomplete.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-02-19 13:59:42 +0000
+++ b/lisp/ChangeLog    2012-02-20 08:06:52 +0000
@@ -1,3 +1,8 @@
+2012-02-20  Leo Liu  <address@hidden>
+
+       * icomplete.el (icomplete-completions): Check FROM arg before
+       passing to substring (Bug#10850).
+
 2012-02-19  Chong Yidong  <address@hidden>
 
        * comint.el: Require ansi-color.

=== modified file 'lisp/icomplete.el'
--- a/lisp/icomplete.el 2012-01-19 07:21:25 +0000
+++ b/lisp/icomplete.el 2012-02-20 08:06:52 +0000
@@ -347,7 +347,9 @@
            (setq prospects nil)
          (while (and comps (not limit))
            (setq comp
-                  (if prefix-len (substring (car comps) prefix-len) (car 
comps))
+                 (if (and prefix-len (<= prefix-len (length (car comps))))
+                     (substring (car comps) prefix-len)
+                   (car comps))
                  comps (cdr comps))
            (cond ((string-equal comp "") (setq most-is-exact t))
                  ((member comp prospects))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]