From 4f7ff561b78525e5cca8c09b188854c219b8903b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gustav=20H=C3=A5llberg?= Date: Fri, 31 Jul 2009 13:52:56 +0200 Subject: [PATCH] stgit.el: Allow operating on the end of each line MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Extend patch/file properties to the newline at the end of each line, allowing stgit-select and similar to take effect with point at the end of line. Signed-off-by: Gustav HÃ¥llberg --- contrib/stgit.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/contrib/stgit.el b/contrib/stgit.el index 3d6be1f..078e46f 100644 --- a/contrib/stgit.el +++ b/contrib/stgit.el @@ -92,6 +92,7 @@ directory DIR or `default-directory'" (if (stgit-patch-empty patch) "(empty) " "") (propertize (or (stgit-patch-desc patch) "") 'face 'stgit-description-face)))) + (insert "\n") (put-text-property start (point) 'entry-type 'patch) (when (memq name stgit-expanded-patches) (stgit-insert-patch-files patch)) @@ -106,7 +107,7 @@ Argument DIR is the repository path." (setq default-directory dir) (stgit-mode) (set (make-local-variable 'stgit-ewoc) - (ewoc-create #'stgit-patch-pp "Branch:\n" "--")) + (ewoc-create #'stgit-patch-pp "Branch:\n\n" "--\n" t)) (setq buffer-read-only t)) buf)) @@ -258,7 +259,7 @@ Returns nil if there was no output." (stgit-run-silent "branch") (buffer-substring (point-min) (1- (point-max)))) 'face 'stgit-branch-name-face) - "\n") + "\n\n") (if stgit-show-worktree "--" (propertize @@ -536,7 +537,7 @@ at point." (ewoc-set-hf ewoc "" (propertize " \n" 'face 'stgit-description-face)))) (goto-char end) - (delete-char -2))) + (delete-char -1))) (defun stgit-select-file () (let ((filename (expand-file-name -- 2.11.0