How to separate history and change number of bookmarks

9 views
Skip to first unread message

Aleksa Petrovic

unread,
Nov 13, 2021, 5:05:13 AM11/13/21
to niceeditor
Hello,

I was wondering if there was a way to separate histories of commands and search terms. At least to disable saving of commands to the history, so I only get history of search terms, or the other way around. Is this possible? I was searching in the source a bit but couldn't come to a conclusion because I didn't understand.

Also I was wondering where is the code for bookmarks (I couldn't find it) and could the limit of ten bookmarks be changed?

Thank you in advance,

Aleksa

Aleksa Petrovic

unread,
Feb 20, 2022, 6:43:54 AMFeb 20
to niceeditor
I have found a solution.

In file ne.h, after #include <stdbool.h> add extern bool search_term;

in file actions.c, after #include <limits.h> add bool search_term = FALSE;

in file actions.c, after case FINDREGEXP_A: add search_term = TRUE;

in file actions.c, after case EXEC_A: add search_term = FALSE;

in file input.c change if (history_buff->num_lines == 0 || ib.len != last->line_len || strncmp(ib.buf, last->line, last->line_len)) add_to_history(ib.buf);
to if (history_buff->num_lines == 0 || ib.len != last->line_len || strncmp(ib.buf, last->line, last->line_len)) if (search_term == true){add_to_history(ib.buf);search_term = false;};
Reply all
Reply to author
Forward
0 new messages