keys: add Shift+Home to get to the top of the backlog. Closes T3582
This commit is contained in:
parent
4e5a07e795
commit
b7817a88b3
1
README
1
README
|
@ -40,6 +40,7 @@ Shift+PgUp = Scroll 1 page up
|
|||
Shift+PgDn = Scroll 1 page down
|
||||
Shift+Up = Scroll 1 line up
|
||||
Shift+Down = Scroll 1 line down
|
||||
Shift+Home = Scroll to the top of the backlog
|
||||
Shift+Left = switch focus to previous terminal inside a window
|
||||
Shift+Right = switch focus to next terminal inside a window
|
||||
Shift+Insert = Paste Clipboard (ctrl+v/c) selection
|
||||
|
|
|
@ -196,6 +196,10 @@ Scroll terminology one line up
|
|||
Scroll terminology one line down
|
||||
.
|
||||
.TP
|
||||
.B Shift+Home
|
||||
Scroll terminology to the top of the backlog
|
||||
.
|
||||
.TP
|
||||
.B Shift+Left
|
||||
Switch focus to previous terminal inside a window when using splits, or the
|
||||
previous tab.
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "col.h"
|
||||
#include "utils.h"
|
||||
|
||||
#define CONF_VER 12
|
||||
#define CONF_VER 13
|
||||
|
||||
#define LIM(v, min, max) {if (v >= max) v = max; else if (v <= min) v = min;}
|
||||
|
||||
|
@ -364,6 +364,7 @@ _add_default_keys(Config *config)
|
|||
ADD_KB("KP_Divide", 0, 0, 1, 0, "copy_clipboard");
|
||||
ADD_KB("Left", 0, 0, 1, 0, "term_prev");
|
||||
ADD_KB("Right", 0, 0, 1, 0, "term_next");
|
||||
ADD_KB("Home", 0, 0, 1, 0, "top_backlog");
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -603,7 +604,10 @@ config_load(const char *key)
|
|||
_add_key(config, "Left", 0, 0, 1, 0, "term_prev");
|
||||
_add_key(config, "Right", 0, 0, 1, 0, "term_next");
|
||||
/*pass through*/
|
||||
case CONF_VER: /* 12 */
|
||||
case 12:
|
||||
_add_key(config, "Home", 0, 0, 1, 0, "top_backlog");
|
||||
/*pass through*/
|
||||
case CONF_VER: /* 13 */
|
||||
config->version = CONF_VER;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -603,6 +603,18 @@ cb_scroll_down_line(Evas_Object *termio_obj)
|
|||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
cb_scroll_top_backlog(Evas_Object *termio_obj)
|
||||
{
|
||||
Termpty *ty = termio_pty_get(termio_obj);
|
||||
|
||||
if (!ty || ty->altbuf)
|
||||
return EINA_FALSE;
|
||||
|
||||
termio_scroll_top_backlog(termio_obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
||||
|
||||
static Shortcut_Action _actions[] =
|
||||
{
|
||||
|
@ -611,6 +623,7 @@ static Shortcut_Action _actions[] =
|
|||
{"one_page_down", gettext_noop("Scroll one page down"), cb_scroll_down_page},
|
||||
{"one_line_up", gettext_noop("Scroll one line up"), cb_scroll_up_line},
|
||||
{"one_line_down", gettext_noop("Scroll one line down"), cb_scroll_down_line},
|
||||
{"top_backlog", gettext_noop("Go to the top of the backlog"), cb_scroll_top_backlog},
|
||||
|
||||
{"group", gettext_noop("Copy/Paste"), NULL},
|
||||
{"copy_primary", gettext_noop("Copy selection to Primary buffer"), cb_copy_primary},
|
||||
|
|
|
@ -342,6 +342,16 @@ termio_scroll_set(Evas_Object *obj, int scroll)
|
|||
_smart_apply(obj);
|
||||
}
|
||||
|
||||
void
|
||||
termio_scroll_top_backlog(Evas_Object *obj)
|
||||
{
|
||||
Termio *sd = evas_object_smart_data_get(obj);
|
||||
EINA_SAFETY_ON_NULL_RETURN(sd);
|
||||
sd->scroll = INT32_MAX;
|
||||
_remove_links(sd, obj);
|
||||
_smart_apply(obj);
|
||||
}
|
||||
|
||||
const char *
|
||||
termio_title_get(Evas_Object *obj)
|
||||
{
|
||||
|
|
|
@ -14,6 +14,7 @@ char *termio_selection_get(Evas_Object *obj,
|
|||
int c1x, int c1y, int c2x, int c2y,
|
||||
size_t *len, Eina_Bool right_trim);
|
||||
Eina_Bool termio_selection_exists(const Evas_Object *obj);
|
||||
void termio_scroll_top_backlog(Evas_Object *obj);
|
||||
void termio_scroll_delta(Evas_Object *obj, int delta, int by_page);
|
||||
void termio_scroll_set(Evas_Object *obj, int scroll);
|
||||
void termio_scroll(Evas_Object *obj, int direction, int start_y, int end_y);
|
||||
|
|
Loading…
Reference in New Issue