summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c60dd8b)
raw | patch | inline | side by side (parent: c60dd8b)
author | Jonas Fonseca <fonseca@diku.dk> | |
Sat, 24 Jan 2009 11:36:03 +0000 (12:36 +0100) | ||
committer | Jonas Fonseca <fonseca@diku.dk> | |
Tue, 27 Jan 2009 23:03:52 +0000 (00:03 +0100) |
NEWS | patch | blob | history | |
manual.txt | patch | blob | history | |
tig.c | patch | blob | history | |
tigrc.5.txt | patch | blob | history |
index 04a1c8305abca00f2bdcac883f247c05f55889f6..6109737b4b05f31a9e0897da398a89ca5beb7bb3 100644 (file)
--- a/NEWS
+++ b/NEWS
- The screen-resize action has been deprecated. It had no real use for
users and was never meant to be exposed.
+ - The "tree-parent" action was renamed to "parent". Warnings will be
+ emitted for transition.
Improvements:
diff --git a/manual.txt b/manual.txt
index 34bc753237d1b267e028ea9e7df81b5f533daeb2..87f949250f165211d9b3d97942e049286192578c 100644 (file)
--- a/manual.txt
+++ b/manual.txt
the previous commit in the main view and update the diff view \
to display it.
Down Similar to 'Up' but will move down.
+',' Move to parent. In the tree view, this means switch to the parent \
+ directory.
-----------------------------------------------------------------------------
[[cursor-nav]]
! Checkout file with unstaged changes. This will reset the file to \
contain the content it had at last commit.
@ Move to next chunk in the stage view.
-',' Move tree view to the parent tree.
e Open file in editor.
-----------------------------------------------------------------------------
index 8c65a4753bb9d2809a7bc93b23d43eb562b8884b..f72932144b4d893db73720d3946da34d15b97ee7 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -666,6 +666,7 @@ static int read_properties(struct io *io, const char *separators, int (*read)(ch
REQ_(ENTER, "Enter current line and scroll"), \
REQ_(NEXT, "Move to next"), \
REQ_(PREVIOUS, "Move to previous"), \
+ REQ_(PARENT, "Move to parent"), \
REQ_(VIEW_NEXT, "Move focus to next view"), \
REQ_(REFRESH, "Reload and refresh"), \
REQ_(MAXIMIZE, "Maximize the current view"), \
@@ -677,7 +678,6 @@ static int read_properties(struct io *io, const char *separators, int (*read)(ch
REQ_(STATUS_REVERT, "Revert file changes"), \
REQ_(STATUS_MERGE, "Merge file using external tool"), \
REQ_(STAGE_NEXT, "Find next chunk to stage"), \
- REQ_(TREE_PARENT, "Switch to parent directory in tree view"), \
\
REQ_GROUP("Cursor navigation") \
REQ_(MOVE_UP, "Move cursor one line up"), \
{ '!', REQ_STATUS_REVERT },
{ 'M', REQ_STATUS_MERGE },
{ '@', REQ_STAGE_NEXT },
- { ',', REQ_TREE_PARENT },
+ { ',', REQ_PARENT },
{ 'e', REQ_EDIT },
};
request = get_request(argv[2]);
if (request == REQ_NONE) {
- const char *obsolete[] = { "cherry-pick", "screen-resize" };
+ struct {
+ const char *name;
+ enum request request;
+ } obsolete[] = {
+ { "cherry-pick", REQ_NONE },
+ { "screen-resize", REQ_NONE },
+ { "tree-parent", REQ_PARENT },
+ };
size_t namelen = strlen(argv[2]);
int i;
for (i = 0; i < ARRAY_SIZE(obsolete); i++) {
- if (namelen == strlen(obsolete[i]) &&
- !string_enum_compare(obsolete[i], argv[2], namelen)) {
- config_msg = "Obsolete request name";
- return ERR;
- }
+ if (namelen != strlen(obsolete[i].name) ||
+ string_enum_compare(obsolete[i].name, argv[2], namelen))
+ continue;
+ if (obsolete[i].request != REQ_NONE)
+ add_keybinding(keymap, obsolete[i].request, key);
+ config_msg = "Obsolete request name";
+ return ERR;
}
}
if (request == REQ_NONE && *argv[2]++ == '!')
}
return REQ_NONE;
- case REQ_TREE_PARENT:
+ case REQ_PARENT:
if (!*opt_path) {
/* quit view if at top of tree */
return REQ_VIEW_CLOSE;
diff --git a/tigrc.5.txt b/tigrc.5.txt
index 02af7faa69749f658ff4700134dbb8735f0ba556..3da0d2f9a3a09589206dec85294498d0f303e791 100644 (file)
--- a/tigrc.5.txt
+++ b/tigrc.5.txt
enter Enter current line and scroll
next Move to next
previous Move to previous
+parent Move to parent
view-next Move focus to next view
refresh Reload and refresh view
maximize Maximize the current view
status-update Update file status
status-merge Resolve unmerged file
stage-next Find next chunk to stage
-tree-parent Switch to parent directory in tree view
edit Open in editor
------------------------------------------------------------------------------