GNU bug report logs -
#35624
log-view-diff regression
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Tue, 7 May 2019 22:02:02 UTC
Severity: normal
Tags: patch
Found in version 26.1
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
> Not to mention that most users would not simply think to create an active
> region before pressing 'd'.
This feature is documented.
> It's better, but a) it shifts the buffer text by 1 pixel, which I actually
> find annoying now that I look at the bottom entry that fits in that window,
My bottom line is partially visible in all buffers anyway.
> b) from your side, it should look suboptimal as well, because the cursor is
> basically invisible when it's on the top line (speaking of WYSIWYG).
Maybe just set window-start to the first non-empty line initially,
thus moving the empty line out of screen?
> If you really must have it this way, do we have an example of invisible
> text expanding when cursor moves inside, and then contracting when it's out
> again? Meaning if would look like an empty line you wanted after you press
> 'C-p', but not visible at all otherwise.
Yes, this is possible:
[vc-git-print-log-cursor-sensor.patch (text/x-diff, inline)]
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index b6feb3b8d1..29acb047c6 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1018,7 +1018,11 @@ vc-git-print-log
;; read-only.
(let ((inhibit-read-only t))
(with-current-buffer buffer
- (insert "\n")
+ (insert (propertize "\n"
+ 'invisible t
+ 'cursor-sensor-functions
+ (list #'(lambda (_w _p dir)
+ (visible-mode (if (eq dir 'entered) 1 0))))))
(apply 'vc-git-command buffer
'async files
(append
@@ -1122,7 +1126,8 @@ vc-git-log-view-mode
(1 'change-log-acknowledgment)
(2 'change-log-acknowledgment))
("^Date: \\(.+\\)" (1 'change-log-date))
- ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message)))))))
+ ("^summary:[ \t]+\\(.+\\)" (1 'log-view-message))))))
+ (cursor-sensor-mode 1))
(defun vc-git-show-log-entry (revision)
This bug report was last modified 5 years and 336 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.