thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.74k stars 241 forks source link

Visual mode copy with "block" cursor. #702

Closed WloHu closed 3 years ago

WloHu commented 4 years ago

In vim in visual mode yanked text includes character under block cursor but in termite character under "block" cursor shape isn't included.

I would like termite to be compatible with vim behavior in such case.

Warepire commented 4 years ago

Cannot reproduce on master. Which version of termite are you using?

termite --version

edit: Include libvte-ng version as well.

jnatten commented 4 years ago

I have the same problem. Running arch x64 with termite v15

@Warepire I'm not familiar with libvte-ng, but here is a list of my installed packages when grepping for vte and termite

termite 15-1
termite-terminfo 15-1
libvterm 0.1.git5.4a5fa43-1
vte-common 0.58.2-1
vte3 0.58.2-1
Warepire commented 4 years ago

Took a glance at the official Arch package, it static links vte-ng 0.56.2.a and uses termite tag v15 as seen here: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/termite

It's missing the commit which I believe fixed the issue on vte-ng 0.55+: 7e9a93b421b9596f8980645a46ac2ad5468dac06

FergusonTG commented 4 years ago

Hope this doesn't count as necrobumping, but I am experiencing the same issue. Using keystrokes (in select mode) 0v$y does not copy the last character of the line.

I refreshed my install of vte-common but this did not seem to make a difference. It's frustrating: is there a workround I can do (except for selecting using V or editing inside copyq)?

Arch Linux + awesome WM $ pacman -Qs 'vte|termite' local/termite 15-1 A simple VTE-based terminal local/termite-terminfo 15-1 Terminfo for Termite, a simple VTE-based terminal local/vte-common 0.60.1-1 Files shared by VTE libraries

Warepire commented 4 years ago

@FergusonTG That seems to be a different bug compared to the initial report (character under cursor not included in copy) while yours is "cursor cannot reach end of the line with $".

I see your bug on termite master too.

I recommend starting a new issue.

FergusonTG commented 4 years ago

@FergusonTG That seems to be a different bug compared to the initial report (character under cursor not included in copy) while yours is "cursor cannot reach end of the line with $".

Sorry if my description was a bit terse: I think this is the same issue. After keying '0v$' the block cursor lands on the last character of the line, but keying 'y' copies the text up to, but not including, that character. I can use 'l' to step past the end of the line, and then 'y' does yank the whole line. Normal cursor movements like '0^$' etc work exactly as expected.

Thank you. And thanks for confirming that this occurs in master.

Tim

Warepire commented 4 years ago

@FergusonTG Try this: https://github.com/Warepire/termite/commit/8930abd91e76aecb04d9f2cb9484801c41ea6291

It seems to work in testing, but not sure if this is the right way to fix it.

Also, make sure to backport the fix mentioned above that's in master but not in the Arch package yet.

FergusonTG commented 4 years ago

On Mon, 13 Apr 2020 02:33:25 -0700 Warepire notifications@github.com wrote:

@FergusonTG Try this: https://github.com/Warepire/termite/commit/8930abd91e76aecb04d9f2cb9484801c41ea6291

It seems to work in testing, but not sure if this is the right way to fix it.

OK: bit of a numpty here with build and make: please excuse ignorance!

I used git clone --recursive https://github.com/Warepire/termite.git and then copied the changed termite.cc file (not sure if that was neccessary, but still...) and then cd termite && make.

This gave error

Package vte-2.91 was not found in the pkg-config search path. Perhaps you should add the directory containing `vte-2.91.pc'

... and compilation terminated with fatal error '32 | #include <gtk/gtk.h>'

Help?

Tim

Warepire commented 4 years ago

https://wiki.archlinux.org/index.php/Arch_Build_System

Make sure to also read the PKGBUILD and makepkg pages linked via that page.

thestinger commented 3 years ago

Termite is obsolete. Please use Alacritty instead. See https://github.com/thestinger/termite#termite-is-obsoleted-by-alacritty for more details.