Replies: 1 comment 1 reply
-
Magit uses specialized
Why is the latter expected by you? The first As a quick check I replaced Maybe, after some reading and with the help of some debug statements, I can find a way to make it always work as intended. I am very very busy right now, so I won't do that soon. As a workaround I believe you can move down an additional line and then up again; then the single, selected line is highlighted as expected. |
Beta Was this translation helpful? Give feedback.
-
Magit
Emacs
Description
Magit selections (in staged or unstaged diffs, for example) behave somewhat surpirsingly when
shift-selection-mode
is on andtransient-mark-mode
off. From a previous discussion with Eli I understood that this is a slightly undersupported feature in Emacs in general, so I'd like to double-check here before opening an issue.Reproducer
Start
emacs -Q
,M-: (package-activate-all) RET
C-u C-x g <some-Git-controlled-directory> RET
Visit some staged or unstaged changes, press
S-<down>
on some diff:Point does not move (expected), Magit selection is displayed (expected)
C-g
(to get rid of the active region)M-x transient-mark-mode RET
Press
S-<down>
on some diff:Message
Mark set
(expected), point does not move (expected),Magit selection is not displayed (not expected)
Only on second
S-<down>
does the Magit selection show up.Educated Guess
I think that at the point in time when the Magit selection is handled (
post-command-hook
)the shift-selection code has not yet set up this temporary transient mark mode, so that
region-active-p
still returnsnil
.I can try to follow up, but please let me know first if there is a general interest in getting this
fixed...
Beta Was this translation helpful? Give feedback.
All reactions