After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 672264 - Copy mode (screen-like)
Copy mode (screen-like)
Status: RESOLVED DUPLICATE of bug 78291
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-03-16 22:05 UTC by Thiago F. G. Albuquerque
Modified: 2014-04-12 15:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thiago F. G. Albuquerque 2012-03-16 22:05:00 UTC
I'd like to have something like screen's "copy mode" in gnome-terminal.

What is this?

You press some key, then you "enter" copy mode. You can move around the scrollback buffer as if it was a file in a text editor. You can:

* move with: the arrows, ^arrows, home, end, ^home, ^end
* search forward / backward / search again like you do in less (/, ?, n, N)
* select with shift + arrows, etc.
* copy with ^Ins / ^C.

When you copy, you "leave" copy mode, and are taken back to the command prompt, where you can paste.
Comment 1 Thiago F. G. Albuquerque 2012-03-16 22:06:06 UTC
I tried to implement a minimal version of this with the methods vte already provides (ruby bindings). I can:

* listen to key events using Gtk.key_snooper_install()
* change the cursor shape (to signal that you have entered/left copy mode)
* get parts of the scrollback buffer with get_text_range()

What is missing:

* a way to move the cursor around -- something like

    set_cursor_position(x, y)

* a way to "select" programmatically. Maybe everything I need from vte is a method to modify the attributes of a specific position, e.g.

    set_attr(x, y, attr)

and the rest can be managed/implemented by the application.
Comment 2 Christian Persch 2014-04-12 15:35:07 UTC

*** This bug has been marked as a duplicate of bug 78291 ***