Bug 470100 - cannot select and copy text on git log
Summary: cannot select and copy text on git log
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: copy-paste (show other bugs)
Version: 23.04.1
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 00:34 UTC by greenscarf005
Modified: 2023-06-04 04:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
video showing that normal selection works, git log | less works, but git log doesn't (1.10 MB, video/mp4)
2023-05-22 00:34 UTC, greenscarf005
Details

Note You need to log in before you can comment on or make changes to this bug.
Description greenscarf005 2023-05-22 00:34:33 UTC
Created attachment 159176 [details]
video showing that normal selection works, git log | less works, but git log doesn't

SUMMARY
cannot select and copy konsole text when running git log.

STEPS TO REPRODUCE

1. run `ls -al`.
2. try to select and copy text by dragging mouse.

3. run `git log | less`.
4. try to select and copy text by dragging mouse.

5. run `git log`.
6. try to select and copy text by dragging mouse.

OBSERVED RESULT

1~4 works whereas 5~6 does not work.

EXPECTED RESULT

text can be copied like normally.

SOFTWARE/OS VERSIONS

Linux: Kubuntu 23.04
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION
there's high change i missed an option to allow it but was unable to find it.
Comment 1 ninjalj 2023-05-31 21:41:26 UTC
In the "git log" example, the mouse pointer is shown as an arrow, while in the other examples it is shown as an I-beam(bar). This means the application enabled mouse-tracking mode, taking control of the mouse. You can still bypass the application handling of the mouse by holding the Shift key while pressing the mouse buttons.

What's the value of the $LESS environment variable? "less" with the "--mouse" option enables mouse tracking mode to be able to react to the scroll-wheel and to set the # mark with a click (which you can then jump to with '# ). 

If you're not using "less" with the --mouse option, what's the value of the $GIT_PAGER and $PAGER environment variables? Have you configured core.pager or pager.log in git?
Comment 2 greenscarf005 2023-06-04 04:36:54 UTC
my bad, i was wrongly adding ' --mouse' option to LESS variable in my .gitconfig like:

[core]
  pager = less -LRc --mouse
[pager]
	diff = LESS='LRc --mouse' delta
	show = LESS='LRc --mouse' delta
	stash = LESS='LRc --mouse' delta
	log = LESS='LRc --mouse' delta
	reflog = LESS='LRc --mouse' delta

after removing '--mouse', it works as intended.

[core]
  pager = delta
[pager]
	diff = LESS=LRc delta
	show = LESS=LRc delta
	stash = LESS=LRc delta
	log = LESS=LRc delta
	reflog = LESS=LRc delta
  blame = LESS=LRc delta