bash/bash-3.2-fc.patch

30 lines
1000 B
Diff
Raw Normal View History

2008-12-15 13:47:06 +00:00
diff -up bash-3.2/builtins/fc.def.fc bash-3.2/builtins/fc.def
--- bash-3.2/builtins/fc.def.fc 2006-07-28 02:44:09.000000000 +0100
+++ bash-3.2/builtins/fc.def 2008-03-13 17:21:15.000000000 +0000
@@ -290,11 +290,6 @@ fc_builtin (list)
line was actually added (HISTIGNORE may have caused it to not be),
so we check hist_last_line_added. */
- /* "When not listing, he fc command that caused the editing shall not be
- entered into the history list." */
- if (listing == 0 && hist_last_line_added)
- delete_last_history ();
-
last_hist = i - 1 - hist_last_line_added;
if (list)
@@ -322,6 +317,11 @@ fc_builtin (list)
histbeg = histend = last_hist;
}
+ /* "When not listing, he fc command that caused the editing shall not be
+ entered into the history list." */
+ if (listing == 0 && hist_last_line_added)
+ delete_last_history ();
+
/* We print error messages for line specifications out of range. */
if ((histbeg < 0) || (histend < 0))
{