Created
October 23, 2013 20:33
-
-
Save ThomasAdam/7126171 to your computer and use it in GitHub Desktop.
Don't allow clear-history to run if pane is in a mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd-clear-history.c b/cmd-clear-history.c | |
| index cce3ea1..8b16215 100644 | |
| --- a/cmd-clear-history.c | |
| +++ b/cmd-clear-history.c | |
| @@ -44,6 +44,10 @@ cmd_clear_history_exec(struct cmd *self, struct cmd_q *cmdq) | |
| if (cmd_find_pane(cmdq, args_get(args, 't'), NULL, &wp) == NULL) | |
| return (CMD_RETURN_ERROR); | |
| + | |
| + if (wp->mode == &window_copy_mode) | |
| + return (CMD_RETURN_ERROR); | |
| + | |
| gd = wp->base.grid; | |
| grid_move_lines(gd, 0, gd->hsize, gd->sy); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment