X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/blobdiff_plain/98230edd817bc40419520433a30807474581bebc..8036afdd59468ace8110891047680f1d4622738a:/contrib/stgit.el diff --git a/contrib/stgit.el b/contrib/stgit.el index 5ed8f4e..0201098 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -567,23 +567,11 @@ (defun stgit-mode () (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." - (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." @@ -653,20 +641,29 @@ (defun stgit-init () (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-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) - (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)