summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 032da7d)
raw | patch | inline | side by side (parent: 032da7d)
author | Pierre Habouzit <madcoder@debian.org> | |
Thu, 24 Jun 2010 15:24:24 +0000 (17:24 +0200) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 26 Jun 2010 00:41:06 +0000 (20:41 -0400) |
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
[ jf: fix built-in description and add entry to the manual ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
[ jf: fix built-in description and add entry to the manual ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
NEWS | patch | blob | history | |
manual.txt | patch | blob | history | |
tig.c | patch | blob | history | |
tigrc.5.txt | patch | blob | history |
index 1a0960aa44a9f67370455c0d44048a4806370292..61d6c884d2dcdc50c56e0be1e245d1d36345b2ad 100644 (file)
--- a/NEWS
+++ b/NEWS
tig master
----------
+Improvements:
+
+ - Add scroll-first-col action to jump to the first column. Bound to '|'
+ by default.
+
Bug fixes:
- Fix problem with empty diff views when file specs were passed on the
diff --git a/manual.txt b/manual.txt
index f6a13d5d56a520eb0b4c3487551037b4b41e456a..ffea349d2537fa66f80f914c4e57473db63f64b1 100644 (file)
--- a/manual.txt
+++ b/manual.txt
|s |Scroll view one page down.
|Left |Scroll view one column left.
|Right |Scroll view one column right.
+|\| |Scroll view to the first column.
|=============================================================================
[[searching]]
index 90c2fc148b724677fe0ef8c7c14008cdc1f90f71..903efdeb7fe264ba5312e0a7979cfcc99fe00c5f 100644 (file)
--- a/tig.c
+++ b/tig.c
REQ_(MOVE_LAST_LINE, "Move cursor to last line"), \
\
REQ_GROUP("Scrolling") \
+ REQ_(SCROLL_FIRST_COL, "Scroll to the first line columns"), \
REQ_(SCROLL_LEFT, "Scroll two columns left"), \
REQ_(SCROLL_RIGHT, "Scroll two columns right"), \
REQ_(SCROLL_LINE_UP, "Scroll one line up"), \
{ '-', REQ_MOVE_PAGE_UP },
/* Scrolling */
+ { '|', REQ_SCROLL_FIRST_COL },
{ KEY_LEFT, REQ_SCROLL_LEFT },
{ KEY_RIGHT, REQ_SCROLL_RIGHT },
{ KEY_IC, REQ_SCROLL_LINE_UP },
assert(view_is_displayed(view));
switch (request) {
+ case REQ_SCROLL_FIRST_COL:
+ view->yoffset = 0;
+ redraw_view_from(view, 0);
+ report("");
+ return;
case REQ_SCROLL_LEFT:
if (view->yoffset == 0) {
report("Cannot scroll beyond the first column");
move_view(view, request);
break;
+ case REQ_SCROLL_FIRST_COL:
case REQ_SCROLL_LEFT:
case REQ_SCROLL_RIGHT:
case REQ_SCROLL_LINE_DOWN:
diff --git a/tigrc.5.txt b/tigrc.5.txt
index 6c88563b90c64c900873fdbe68551d3a2a738353..df487497c79048131bae5fb28da3bc7abfb96d25 100644 (file)
--- a/tigrc.5.txt
+++ b/tigrc.5.txt
|scroll-line-down |Scroll one line down
|scroll-page-up |Scroll one page up
|scroll-page-down |Scroll one page down
+|scroll-first-col |Scroll to the first column
|scroll-left |Scroll one column left
|scroll-right |Scroll one column right
|=============================================================================