commit 3435a0ff64282394c55083b0a30b4057cdf01a4f
parent 66357b5462790d465abb08bb1c4d848a25f4c213
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Fri, 17 Jun 2005 21:08:13 +0000
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
Diffstat:
7 files changed, 20 insertions(+), 17 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -94,8 +94,9 @@ CVS code -
toggle_init(), usage(), do_tab(), main(), nanorc.sample,
nano.1, nanorc.5, and nano.texi. (DLR, suggested by many
people)
- - Change the REVERSE_SEARCH flag to the BACKWARDS_SEARCH flag.
- (DLR)
+ - Change the CONSTUPDATE, REVERSE_SEARCH, and SMOOTHSCROLL flags
+ to the CONST_UPDATE, BACKWARDS_SEARCH, and SMOOTH_SCROLL
+ flags, respectively. (DLR)
- Change the SMOOTHSCROLL flag to the SMOOTH_SCROLL flag. (DLR)
- Change the NO_UTF8 flag to the USE_UTF8 flag, and reverse its
meaning. (DLR)
@@ -172,6 +173,8 @@ CVS code -
used. (DLR)
- Change the description of the Meta-B toggle at the search
prompt from "Direction" to "Backwards", for consistency. (DLR)
+ toggle_init()
+ - Clarify the description of M-C. (DLR)
thanks_for_all_the_fish()
- Remove free_toggles() and move its code here verbatim, as it's
only called here anyway. (David Benbennick)
diff --git a/src/files.c b/src/files.c
@@ -2455,7 +2455,7 @@ char **browser_init(const char *path, int *longest, size_t *numents, DIR
char *do_browser(char *path, DIR *dir)
{
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;
char **filelist, *retval = NULL;
@@ -2470,7 +2470,7 @@ char *do_browser(char *path, DIR *dir)
currshortcut = browser_list;
#endif
- UNSET(CONSTUPDATE);
+ UNSET(CONST_UPDATE);
change_browser_directory:
/* We go here after the user selects a new directory. */
@@ -2816,8 +2816,8 @@ char *do_browser(char *path, DIR *dir)
titlebar(NULL);
edit_refresh();
curs_set(1);
- if (old_constupdate)
- SET(CONSTUPDATE);
+ if (old_const_update)
+ SET(CONST_UPDATE);
/* Clean up. */
free_chararray(filelist, numents);
diff --git a/src/global.c b/src/global.c
@@ -1112,8 +1112,8 @@ void toggle_init(void)
toggle_init_one(TOGGLE_MULTIBUFFER_KEY,
N_("Multiple file buffers"), MULTIBUFFER);
#endif
- toggle_init_one(TOGGLE_CONST_KEY, N_("Constant cursor position"),
- CONSTUPDATE);
+ toggle_init_one(TOGGLE_CONST_KEY,
+ N_("Constant cursor position display"), CONST_UPDATE);
toggle_init_one(TOGGLE_AUTOINDENT_KEY, N_("Auto indent"),
AUTOINDENT);
#ifndef DISABLE_WRAPPING
diff --git a/src/nano.c b/src/nano.c
@@ -3987,7 +3987,7 @@ bool do_mouse(void)
void do_output(char *output, size_t output_len, bool allow_cntrls)
{
size_t current_len, i = 0;
- bool old_constupdate = ISSET(CONSTUPDATE);
+ bool old_const_update = ISSET(CONST_UPDATE);
bool do_refresh = FALSE;
/* Do we have to call edit_refresh(), or can we get away with
* update_line()? */
@@ -4000,7 +4000,7 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
current_len = strlen(current->data);
/* Turn off constant cursor position display. */
- UNSET(CONSTUPDATE);
+ UNSET(CONST_UPDATE);
while (i < output_len) {
/* 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)
/* Turn constant cursor position display back on if it was on
* before. */
- if (old_constupdate)
- SET(CONSTUPDATE);
+ if (old_const_update)
+ SET(CONST_UPDATE);
free(char_buf);
@@ -4285,7 +4285,7 @@ int main(int argc, char **argv)
SET(RESTRICTED);
break;
case 'c':
- SET(CONSTUPDATE);
+ SET(CONST_UPDATE);
break;
case 'd':
SET(REBIND_DELETE);
@@ -4644,7 +4644,7 @@ int main(int argc, char **argv)
/* If constant cursor position display is on, display the cursor
* position. */
- if (ISSET(CONSTUPDATE))
+ if (ISSET(CONST_UPDATE))
do_cursorpos(TRUE);
currshortcut = main_list;
diff --git a/src/nano.h b/src/nano.h
@@ -277,7 +277,7 @@ typedef struct syntaxtype {
#define MODIFIED (1<<0)
#define CASE_SENSITIVE (1<<1)
#define MARK_ISSET (1<<2)
-#define CONSTUPDATE (1<<3)
+#define CONST_UPDATE (1<<3)
#define NO_HELP (1<<4)
#define NOFOLLOW_SYMLINKS (1<<5)
#define SUSPEND (1<<6)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -40,7 +40,7 @@ const static rcoption rcopts[] = {
#ifndef DISABLE_JUSTIFY
{"brackets", 0},
#endif
- {"const", CONSTUPDATE},
+ {"const", CONST_UPDATE},
#ifndef DISABLE_WRAPJUSTIFY
{"fill", 0},
#endif
diff --git a/src/winio.c b/src/winio.c
@@ -2210,7 +2210,7 @@ void check_statusblank(void)
{
if (statusblank > 1)
statusblank--;
- else if (statusblank == 1 && !ISSET(CONSTUPDATE)) {
+ else if (statusblank == 1 && !ISSET(CONST_UPDATE)) {
statusblank = 0;
blank_statusbar();
wnoutrefresh(bottomwin);