Commit 3435a0ff authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

rename the CONSTUPDATE flag to CONST_UPDATE, and clarify its description

in the help text


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2711 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 20 additions and 17 deletions
+20 -17
...@@ -94,8 +94,9 @@ CVS code - ...@@ -94,8 +94,9 @@ CVS code -
toggle_init(), usage(), do_tab(), main(), nanorc.sample, toggle_init(), usage(), do_tab(), main(), nanorc.sample,
nano.1, nanorc.5, and nano.texi. (DLR, suggested by many nano.1, nanorc.5, and nano.texi. (DLR, suggested by many
people) people)
- Change the REVERSE_SEARCH flag to the BACKWARDS_SEARCH flag. - Change the CONSTUPDATE, REVERSE_SEARCH, and SMOOTHSCROLL flags
(DLR) to the CONST_UPDATE, BACKWARDS_SEARCH, and SMOOTH_SCROLL
flags, respectively. (DLR)
- Change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag. (DLR) - Change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag. (DLR)
- Change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its - Change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its
meaning. (DLR) meaning. (DLR)
...@@ -172,6 +173,8 @@ CVS code - ...@@ -172,6 +173,8 @@ CVS code -
used. (DLR) used. (DLR)
- Change the description of the Meta-B toggle at the search - Change the description of the Meta-B toggle at the search
prompt from "Direction" to "Backwards", for consistency. (DLR) prompt from "Direction" to "Backwards", for consistency. (DLR)
toggle_init()
- Clarify the description of M-C. (DLR)
thanks_for_all_the_fish() thanks_for_all_the_fish()
- Remove free_toggles() and move its code here verbatim, as it's - Remove free_toggles() and move its code here verbatim, as it's
only called here anyway. (David Benbennick) only called here anyway. (David Benbennick)
......
...@@ -2455,7 +2455,7 @@ char **browser_init(const char *path, int *longest, size_t *numents, DIR ...@@ -2455,7 +2455,7 @@ char **browser_init(const char *path, int *longest, size_t *numents, DIR
char *do_browser(char *path, DIR *dir) char *do_browser(char *path, DIR *dir)
{ {
int kbinput, longest, selected, width; int kbinput, longest, selected, width;
bool meta_key, func_key, old_constupdate = ISSET(CONSTUPDATE); bool meta_key, func_key, old_const_update = ISSET(CONST_UPDATE);
size_t numents; size_t numents;
char **filelist, *retval = NULL; char **filelist, *retval = NULL;
...@@ -2470,7 +2470,7 @@ char *do_browser(char *path, DIR *dir) ...@@ -2470,7 +2470,7 @@ char *do_browser(char *path, DIR *dir)
currshortcut = browser_list; currshortcut = browser_list;
#endif #endif
UNSET(CONSTUPDATE); UNSET(CONST_UPDATE);
change_browser_directory: change_browser_directory:
/* We go here after the user selects a new directory. */ /* We go here after the user selects a new directory. */
...@@ -2816,8 +2816,8 @@ char *do_browser(char *path, DIR *dir) ...@@ -2816,8 +2816,8 @@ char *do_browser(char *path, DIR *dir)
titlebar(NULL); titlebar(NULL);
edit_refresh(); edit_refresh();
curs_set(1); curs_set(1);
if (old_constupdate) if (old_const_update)
SET(CONSTUPDATE); SET(CONST_UPDATE);
/* Clean up. */ /* Clean up. */
free_chararray(filelist, numents); free_chararray(filelist, numents);
......
...@@ -1112,8 +1112,8 @@ void toggle_init(void) ...@@ -1112,8 +1112,8 @@ void toggle_init(void)
toggle_init_one(TOGGLE_MULTIBUFFER_KEY, toggle_init_one(TOGGLE_MULTIBUFFER_KEY,
N_("Multiple file buffers"), MULTIBUFFER); N_("Multiple file buffers"), MULTIBUFFER);
#endif #endif
toggle_init_one(TOGGLE_CONST_KEY, N_("Constant cursor position"), toggle_init_one(TOGGLE_CONST_KEY,
CONSTUPDATE); N_("Constant cursor position display"), CONST_UPDATE);
toggle_init_one(TOGGLE_AUTOINDENT_KEY, N_("Auto indent"), toggle_init_one(TOGGLE_AUTOINDENT_KEY, N_("Auto indent"),
AUTOINDENT); AUTOINDENT);
#ifndef DISABLE_WRAPPING #ifndef DISABLE_WRAPPING
......
...@@ -3987,7 +3987,7 @@ bool do_mouse(void) ...@@ -3987,7 +3987,7 @@ bool do_mouse(void)
void do_output(char *output, size_t output_len, bool allow_cntrls) void do_output(char *output, size_t output_len, bool allow_cntrls)
{ {
size_t current_len, i = 0; size_t current_len, i = 0;
bool old_constupdate = ISSET(CONSTUPDATE); bool old_const_update = ISSET(CONST_UPDATE);
bool do_refresh = FALSE; bool do_refresh = FALSE;
/* Do we have to call edit_refresh(), or can we get away with /* Do we have to call edit_refresh(), or can we get away with
* update_line()? */ * update_line()? */
...@@ -4000,7 +4000,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) ...@@ -4000,7 +4000,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
current_len = strlen(current->data); current_len = strlen(current->data);
/* Turn off constant cursor position display. */ /* Turn off constant cursor position display. */
UNSET(CONSTUPDATE); UNSET(CONST_UPDATE);
while (i < output_len) { while (i < output_len) {
/* If allow_cntrls is FALSE, filter out nulls and newlines, /* If allow_cntrls is FALSE, filter out nulls and newlines,
...@@ -4079,8 +4079,8 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) ...@@ -4079,8 +4079,8 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
/* Turn constant cursor position display back on if it was on /* Turn constant cursor position display back on if it was on
* before. */ * before. */
if (old_constupdate) if (old_const_update)
SET(CONSTUPDATE); SET(CONST_UPDATE);
free(char_buf); free(char_buf);
...@@ -4285,7 +4285,7 @@ int main(int argc, char **argv) ...@@ -4285,7 +4285,7 @@ int main(int argc, char **argv)
SET(RESTRICTED); SET(RESTRICTED);
break; break;
case 'c': case 'c':
SET(CONSTUPDATE); SET(CONST_UPDATE);
break; break;
case 'd': case 'd':
SET(REBIND_DELETE); SET(REBIND_DELETE);
...@@ -4644,7 +4644,7 @@ int main(int argc, char **argv) ...@@ -4644,7 +4644,7 @@ int main(int argc, char **argv)
/* If constant cursor position display is on, display the cursor /* If constant cursor position display is on, display the cursor
* position. */ * position. */
if (ISSET(CONSTUPDATE)) if (ISSET(CONST_UPDATE))
do_cursorpos(TRUE); do_cursorpos(TRUE);
currshortcut = main_list; currshortcut = main_list;
......
...@@ -277,7 +277,7 @@ typedef struct syntaxtype { ...@@ -277,7 +277,7 @@ typedef struct syntaxtype {
#define MODIFIED (1<<0) #define MODIFIED (1<<0)
#define CASE_SENSITIVE (1<<1) #define CASE_SENSITIVE (1<<1)
#define MARK_ISSET (1<<2) #define MARK_ISSET (1<<2)
#define CONSTUPDATE (1<<3) #define CONST_UPDATE (1<<3)
#define NO_HELP (1<<4) #define NO_HELP (1<<4)
#define NOFOLLOW_SYMLINKS (1<<5) #define NOFOLLOW_SYMLINKS (1<<5)
#define SUSPEND (1<<6) #define SUSPEND (1<<6)
......
...@@ -40,7 +40,7 @@ const static rcoption rcopts[] = { ...@@ -40,7 +40,7 @@ const static rcoption rcopts[] = {
#ifndef DISABLE_JUSTIFY #ifndef DISABLE_JUSTIFY
{"brackets", 0}, {"brackets", 0},
#endif #endif
{"const", CONSTUPDATE}, {"const", CONST_UPDATE},
#ifndef DISABLE_WRAPJUSTIFY #ifndef DISABLE_WRAPJUSTIFY
{"fill", 0}, {"fill", 0},
#endif #endif
......
...@@ -2210,7 +2210,7 @@ void check_statusblank(void) ...@@ -2210,7 +2210,7 @@ void check_statusblank(void)
{ {
if (statusblank > 1) if (statusblank > 1)
statusblank--; statusblank--;
else if (statusblank == 1 && !ISSET(CONSTUPDATE)) { else if (statusblank == 1 && !ISSET(CONST_UPDATE)) {
statusblank = 0; statusblank = 0;
blank_statusbar(); blank_statusbar();
wnoutrefresh(bottomwin); wnoutrefresh(bottomwin);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment