erc-commit
[Top][All Lists]
Advanced

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

[Erc-commit] [commit][master] erc-goodies: Fix off-by-one error in move-


From: mwolson
Subject: [Erc-commit] [commit][master] erc-goodies: Fix off-by-one error in move-to-prompt module.
Date: Sun, 20 Jan 2008 17:40:13 -0500

commit 277b75be519ee36d706ba1ba31b64cbd15a59964
Author: Michael W. Olson <address@hidden>
Date:   Sun Jan 20 17:31:37 2008 -0500

    erc-goodies: Fix off-by-one error in move-to-prompt module.

diff --git a/ChangeLog b/ChangeLog
index 3ba17ce..8e6d89d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-01-20  Michael Olson  <address@hidden>
 
+       * erc-goodies.el (erc-move-to-prompt, erc-move-to-prompt-xemacs):
+       Fix off-by-one error that caused the point to move when placed at
+       the beginning of some already-typed text.  Thanks to e1f for the
+       report.
+
        * erc-dcc.el, erc-xdcc.el: Add simple module definitions.
 
        * erc.el (erc-modules): Add dcc and xdcc.
diff --git a/erc-goodies.el b/erc-goodies.el
index c29f155..acf08cc 100644
--- a/erc-goodies.el
+++ b/erc-goodies.el
@@ -153,13 +153,13 @@ does not appear in the ERC buffer after the user presses 
ENTER.")
 (defun erc-move-to-prompt ()
   "Move the point to the ERC prompt."
   (interactive)
-  (when (and erc-input-marker (<= (point) erc-input-marker))
+  (when (and erc-input-marker (< (point) erc-input-marker))
     (goto-char (point-max)))
   (call-interactively 'self-insert-command))
 
 (defun erc-move-to-prompt-xemacs ()
   "Move the point to the ERC prompt if this is a self-inserting command."
-  (when (and erc-input-marker (<= (point) erc-input-marker)
+  (when (and erc-input-marker (< (point) erc-input-marker)
              (eq 'self-insert-command this-command))
     (goto-char (point-max))))
 




reply via email to

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