chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stgit.el: Invalidate ewoc node when marking or unmarking instead of modifying buffer...
[stgit]
/
contrib
/
stgit.el
diff --git
a/contrib/stgit.el
b/contrib/stgit.el
index 5ed8f4e6a0aeba3e3fda7bc86f44f84feb76faf3..0201098ddae2c3bb4a5512c124052c2873a26a04 100644
(file)
--- a/
contrib/stgit.el
+++ b/
contrib/stgit.el
@@
-567,23
+567,11
@@
(defun stgit-mode ()
(defun stgit-add-mark (patchsym)
"Mark the patch PATCHSYM."
(defun stgit-add-mark (patchsym)
"Mark the patch PATCHSYM."
- (setq stgit-marked-patches (cons patchsym stgit-marked-patches))
- (save-excursion
- (when (stgit-goto-patch patchsym)
- (move-to-column 1)
- (let ((inhibit-read-only t))
- (insert-and-inherit ?*)
- (delete-char 1)))))
+ (setq stgit-marked-patches (cons patchsym stgit-marked-patches)))
(defun stgit-remove-mark (patchsym)
"Unmark the patch PATCHSYM."
(defun stgit-remove-mark (patchsym)
"Unmark the patch PATCHSYM."
- (setq stgit-marked-patches (delq patchsym stgit-marked-patches))
- (save-excursion
- (when (stgit-goto-patch patchsym)
- (move-to-column 1)
- (let ((inhibit-read-only t))
- (insert-and-inherit ? )
- (delete-char 1)))))
+ (setq stgit-marked-patches (delq patchsym stgit-marked-patches)))
(defun stgit-clear-marks ()
"Unmark all patches."
(defun stgit-clear-marks ()
"Unmark all patches."
@@
-653,20
+641,29
@@
(defun stgit-init ()
(defun stgit-mark ()
"Mark the patch under point."
(interactive)
(defun stgit-mark ()
"Mark the patch under point."
(interactive)
- (let ((patch (stgit-patch-name-at-point t)))
- (stgit-add-mark patch))
+ (let* ((node (ewoc-locate stgit-ewoc))
+ (patch (ewoc-data node)))
+ (stgit-add-mark (stgit-patch-name patch))
+ (ewoc-invalidate stgit-ewoc node))
(stgit-next-patch))
(defun stgit-unmark-up ()
"Remove mark from the patch on the previous line."
(interactive)
(stgit-previous-patch)
(stgit-next-patch))
(defun stgit-unmark-up ()
"Remove mark from the patch on the previous line."
(interactive)
(stgit-previous-patch)
- (stgit-remove-mark (stgit-patch-name-at-point t)))
+ (let* ((node (ewoc-locate stgit-ewoc))
+ (patch (ewoc-data node)))
+ (stgit-remove-mark (stgit-patch-name patch))
+ (ewoc-invalidate stgit-ewoc node))
+ (move-to-column (stgit-goal-column)))
(defun stgit-unmark-down ()
"Remove mark from the patch on the current line."
(interactive)
(defun stgit-unmark-down ()
"Remove mark from the patch on the current line."
(interactive)
- (stgit-remove-mark (stgit-patch-name-at-point t))
+ (let* ((node (ewoc-locate stgit-ewoc))
+ (patch (ewoc-data node)))
+ (stgit-remove-mark (stgit-patch-name patch))
+ (ewoc-invalidate stgit-ewoc node))
(stgit-next-patch))
(defun stgit-rename (name)
(stgit-next-patch))
(defun stgit-rename (name)