From a864186368d7ec03cdd14f5ea85b8fb34fe9e923 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Thu, 21 Nov 2019 16:59:17 -0500 Subject: Just use H_LOAD and H_SAVE --- bin/1sh/histedit.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'bin/1sh') diff --git a/bin/1sh/histedit.c b/bin/1sh/histedit.c index 0d23e9aa..4c0821dd 100644 --- a/bin/1sh/histedit.c +++ b/bin/1sh/histedit.c @@ -68,7 +68,6 @@ History *hist; /* history cookie */ EditLine *el; /* editline cookie */ int displayhist; static FILE *el_in, *el_out, *el_err; -static HistEvent he_saved; static void history_load(const char *hf); static void history_save(const char *hf); @@ -185,8 +184,6 @@ history_load(const char *hf) { return; if (history(hist, &he, H_LOAD, ehf) == -1) warning("%s: %s", he.str, ehf); - else - history(hist, &he_saved, H_FIRST); } @@ -198,11 +195,7 @@ history_save(const char *hf) { ehf = expandstr(hf); if (ehf == NULL) return; - if (he_saved.num == 0) - history(hist, &he_saved, H_LAST); - else - history(hist, &he_saved, H_NEXT_EVENT, he_saved.num + 1); - if (history(hist, &he, H_SAVE_INCR, ehf, he_saved.num) == -1) + if (history(hist, &he, H_SAVE, ehf) == -1) warning("%s: %s", he.str, ehf); } -- cgit 1.4.1 ='/src/commit/bin/watch.c?id=9f3407a9efe090ffad5e635f2ec5c8281c90d404&follow=1'>commit diff
path: root/bin/watch.c (unfollow)
Commit message (Collapse)Author
2018-02-01Uncapitalize "framebuffer"June McEnroe
Oops.
2018-02-01Add fbattJune McEnroe
2018-02-01Blank framebuffer with sampled background on exitJune McEnroe
This should work like 99% of the time, probably.
2018-02-01Add bin/READMEJune McEnroe
2018-02-01Add license notice to gfxxJune McEnroe
2018-02-01Build any target by defaultJune McEnroe
2018-02-01Remove fb.c and color.cJune McEnroe
2018-02-01Add gfxxJune McEnroe
2018-01-31Map \h to sort includesJune McEnroe
2018-01-31Only load 128 glyphs in fbclockJune McEnroe
There's no point loading more than ASCII since it doesn't interpret the unicode table at all.
2018-01-30Style tweak fbclockJune McEnroe
2018-01-30Remove Tarmak and Colemak keylayoutsJune McEnroe
2018-01-29Generalize hnelJune McEnroe
It's like tr for PTYs.
2018-01-29Remove Tarmak remappings from vimJune McEnroe
2018-01-29Switch back to QWERTY on LinuxJune McEnroe
I think the only thing I'll miss is N and E on home row (which was Tarmak 1, if I remember correctly).
2018-01-29Take fbclock font in env varJune McEnroe
2018-01-29Support fbclock fonts wider than 8June McEnroe
2018-01-29Take font path on fbclock argvJune McEnroe
2018-01-29Add fbclockJune McEnroe
2018-01-29Remove color from MakefileJune McEnroe
2018-01-29Set t_Co = 8June McEnroe
Weirdly with t_Co = 16 yellow and bright white weren't showing up on TERM=linux.
2018-01-29Add :Q command aliasJune McEnroe
It seemes I can't take my finger off the shift key fast enough.
2018-01-29Add setuid target for briJune McEnroe
2018-01-28Add init function to fb interfaceJune McEnroe
2018-01-28Add color.cJune McEnroe