[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-matchit 2b9b68770a 219/244: fixed: cannot jump back f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-matchit 2b9b68770a 219/244: fixed: cannot jump back from the line end in visual mode |
Date: |
Thu, 6 Jan 2022 02:59:03 -0500 (EST) |
branch: elpa/evil-matchit
commit 2b9b68770a384672e1fdc02326036a05d3cbaf01
Author: Chen Bin <chenbin.sh@gmail.com>
Commit: Chen Bin <chenbin.sh@gmail.com>
fixed: cannot jump back from the line end in visual mode
---
evil-matchit-simple.el | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/evil-matchit-simple.el b/evil-matchit-simple.el
index 090361ac2d..98c0c57dc2 100644
--- a/evil-matchit-simple.el
+++ b/evil-matchit-simple.el
@@ -86,11 +86,31 @@ If it's t, use simple jump.")
;; sorry we could not jump between ends of string in python-mode
(memq ch evilmi-quote-chars)))))
+(defun evilmi-simple-following-char ()
+ "Get the character at point or find matching tag start point nearby."
+ (let* ((b (line-beginning-position))
+ (whitespaces '(9 10 13 32))
+ new-pos)
+
+ (save-excursion
+ (let* (ch found)
+ (while (and (setq ch (following-char))
+ (> (point) b)
+ (not (setq found (or (memq ch evilmi-backward-chars)
+ (memq ch evilmi-forward-chars))))
+ (memq ch whitespaces))
+ (goto-char (1- (point))))
+ (if found (setq new-pos (point)))))
+
+ (if new-pos (goto-char new-pos))
+
+ (following-char)))
+
;;;###autoload
(defun evilmi-simple-get-tag ()
"Get current tag in simple language."
(let* (forward-line-num
- (ch (following-char))
+ (ch (evilmi-simple-following-char))
rlt)
(cond
- [nongnu] elpa/evil-matchit d1f59ad941 225/244: Merge pull request #131 from nbfalcon/bugfix/evilmi-sdk-simple-jump-whitespace, (continued)
- [nongnu] elpa/evil-matchit d1f59ad941 225/244: Merge pull request #131 from nbfalcon/bugfix/evilmi-sdk-simple-jump-whitespace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit ccc2cc8a62 221/244: `evilmi-sdk-simple-jump': skip whitespace, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 8862d8ea15 079/244: support for statement in lua-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 79ec08d921 113/244: add more verilog keywords, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e9f77f7d6a 115/244: user can use less optimized algorithm, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 304f22100e 136/244: handle ruby statement after assign operator, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 6cfdbe895f 153/244: [chen] add support for react-mode and typescript-tsx-mode, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit e137a380ee 148/244: Merge pull request #91 from Khady/ocaml-check-keywords, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 130941b1a4 193/244: can jump from end of html self closing tag, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 1c758b5b52 227/244: Fix byte compiling, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 2b9b68770a 219/244: fixed: cannot jump back from the line end in visual mode,
ELPA Syncer <=
- [nongnu] elpa/evil-matchit 69807cf829 241/244: use semantic api to improve simple jump algorithm, ELPA Syncer, 2022/01/06
- [nongnu] elpa/evil-matchit 6254f7c812 220/244: fixed CI, ELPA Syncer, 2022/01/06