You are not logged in.

#1 2012-05-04 01:46:39

marin
Member
Registered: 2009-03-23
Posts: 3

less-mouse and text selection

I needed to scroll man pages with a mouse so I compiled the less-mouse from the AUR .

Unfortunately the ability to use mouse for text selection is now lost (comparing to regular 'less'). In regular less left-button-drag selects stream of text and ctrl-left-button-drag selects a block of text.

I tried to look closely at the patch to try to filter back in the text selection but my knowledge of C just isn't up to it.


Mouse clicks in less-mouse are putting escape sequences in the status line. To get rid of those I managed to add two lines in decode.c, so that the program now processes only wheel events:

decode.c (patched) at line 934:

	if ((b & 0x60) != 0x60)  // only if bit 6 is 1 which means no wheel event
		return (1);      // stop processing current mouse event
                                 // *hoping* that vte or X or whoever parses it further?

I'd very much like to hear the advice on how to reinstate the ability of 'less-mouse' to select text.

ps. I tried to use w3m as a pager too, but as far as I could tell it doesn't have the ability to select text either.


Phenom II 3.2GHz, 2G RAM, ATI 4290, Pekwm

Offline

#2 2012-05-04 04:56:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: less-mouse and text selection

Offline

#3 2012-05-04 06:37:23

dodo3773
Member
Registered: 2011-03-17
Posts: 820

Re: less-mouse and text selection

Vimpager allows scrolling man pages with the mouse (its in the repos ( community/vimpager )). Install it and add this to your .zshrc (or .bashrc if you use bash):

export PAGER=vimpager
alias less=$PAGER
alias zless=$PAGER

Offline

Board footer

Powered by FluxBB