summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f83b1c3)
raw | patch | inline | side by side (parent: f83b1c3)
author | Dominik Vogt <dvogt@ffm.tc.iot.dtag.de> | |
Thu, 1 Nov 2007 09:30:20 +0000 (10:30 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Fri, 2 Nov 2007 00:15:42 +0000 (01:15 +0100) |
This allow to leave the current directory in the tree view and change to
the parent tree / directory. At the top of the tree, this closes the tree
view. Bound to ',' by default.
Example:
bind tree Left tree-parent
bind tree Right Enter
bind blob Left view-close
This allows to navigate the tree and blob views just with the cursor keys.
[ Cleanup the patch a bit and mention the default keybinding in
manual.txt --jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
the parent tree / directory. At the top of the tree, this closes the tree
view. Bound to ',' by default.
Example:
bind tree Left tree-parent
bind tree Right Enter
bind blob Left view-close
This allows to navigate the tree and blob views just with the cursor keys.
[ Cleanup the patch a bit and mention the default keybinding in
manual.txt --jonas ]
Signed-off-by: Jonas Fonseca <fonseca@diku.dk>
manual.txt | patch | blob | history | |
tig.c | patch | blob | history | |
tigrc.5.txt | patch | blob | history |
diff --git a/manual.txt b/manual.txt
index 247122883bcd51ec61f0c7a58285b3b349f97394..1bafd1b05ccf1e1ec60cde48334134da7df272dc 100644 (file)
--- a/manual.txt
+++ b/manual.txt
M Resolve unmerged file by launching git-mergetool(1). Note, to work \
correctly this might require some initial configuration of your \
preferred merge tool. See the manpage of git-mergetool(1).
+',' Move tree view to the parent tree.
+e Open file in editor.
-----------------------------------------------------------------------------
[[external-commands]]
index 7130943ebc6ae5894585eb04a0b1bf1c450a929c..73c8b255a9d0a514b6802c88259611b895440e7e 100644 (file)
--- a/tig.c
+++ b/tig.c
REQ_(TOGGLE_REV_GRAPH, "Toggle revision graph visualization"), \
REQ_(STATUS_UPDATE, "Update file status"), \
REQ_(STATUS_MERGE, "Merge file using external tool"), \
+ REQ_(TREE_PARENT, "Switch to parent directory in tree view"), \
REQ_(EDIT, "Open in editor"), \
REQ_(NONE, "Do nothing")
{ ':', REQ_PROMPT },
{ 'u', REQ_STATUS_UPDATE },
{ 'M', REQ_STATUS_MERGE },
+ { ',', REQ_TREE_PARENT },
{ 'e', REQ_EDIT },
/* Using the ncurses SIGWINCH handler. */
{
enum open_flags flags;
+ if (request == REQ_TREE_PARENT) {
+ if (*opt_path) {
+ /* fake 'cd ..' */
+ request = REQ_ENTER;
+ line = &view->line[1];
+ } else {
+ /* quit view if at top of tree */
+ return REQ_VIEW_CLOSE;
+ }
+ }
if (request != REQ_ENTER)
return request;
diff --git a/tigrc.5.txt b/tigrc.5.txt
index 521880b1051d799edac06008ade61e56e2b3dece..f62a0077256fc44185679f54d85662e88d702aee 100644 (file)
--- a/tigrc.5.txt
+++ b/tigrc.5.txt
toggle-rev-graph Toggle revision graph visualization
status-update Update file status
status-merge Resolve unmerged file
+tree-parent Switch to parent directory in tree view
edit Open in editor
------------------------------------------------------------------------------