Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
74f12885
Commit
74f12885
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a constant, to match the corresponding option
parent
953fbf8e
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/global.c
+3
-3
src/global.c
src/nano.c
+2
-2
src/nano.c
src/nano.h
+1
-1
src/nano.h
src/rcfile.c
+2
-2
src/rcfile.c
src/text.c
+2
-2
src/text.c
src/winio.c
+1
-1
src/winio.c
with
11 additions
and
11 deletions
+11
-11
src/global.c
View file @
74f12885
...
...
@@ -1176,7 +1176,7 @@ void shortcut_init(void)
#ifndef NANO_TINY
/* Group of "Appearance" toggles. */
add_to_sclist
(
MMAIN
,
"M-X"
,
0
,
do_toggle_void
,
NO_HELP
);
add_to_sclist
(
MMAIN
,
"M-C"
,
0
,
do_toggle_void
,
CONST
_UPDATE
);
add_to_sclist
(
MMAIN
,
"M-C"
,
0
,
do_toggle_void
,
CONST
ANT_SHOW
);
add_to_sclist
(
MMAIN
,
"M-O"
,
0
,
do_toggle_void
,
MORE_SPACE
);
add_to_sclist
(
MMAIN
,
"M-S"
,
0
,
do_toggle_void
,
SMOOTH_SCROLL
);
add_to_sclist
(
MMAIN
,
"M-$"
,
0
,
do_toggle_void
,
SOFTWRAP
);
...
...
@@ -1339,7 +1339,7 @@ const char *flagtostr(int flag)
/* TRANSLATORS: The next seventeen strings are toggle descriptions;
* they are best kept shorter than 40 characters, but may be longer. */
return
N_
(
"Help mode"
);
case
CONST
_UPDATE
:
case
CONST
ANT_SHOW
:
return
N_
(
"Constant cursor position display"
);
case
MORE_SPACE
:
return
N_
(
"Use of one more line for editing"
);
...
...
@@ -1596,7 +1596,7 @@ sc *strtosc(const char *input)
if
(
!
strcasecmp
(
input
,
"nohelp"
))
s
->
toggle
=
NO_HELP
;
else
if
(
!
strcasecmp
(
input
,
"constupdate"
))
s
->
toggle
=
CONST
_UPDATE
;
s
->
toggle
=
CONST
ANT_SHOW
;
else
if
(
!
strcasecmp
(
input
,
"morespace"
))
s
->
toggle
=
MORE_SPACE
;
else
if
(
!
strcasecmp
(
input
,
"smoothscroll"
))
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
74f12885
...
...
@@ -2141,7 +2141,7 @@ int main(int argc, char **argv)
break
;
#endif
case
'c'
:
SET
(
CONST
_UPDATE
);
SET
(
CONST
ANT_SHOW
);
break
;
case
'd'
:
SET
(
REBIND_DELETE
);
...
...
@@ -2660,7 +2660,7 @@ int main(int argc, char **argv)
/* Update the displayed current cursor position only when there
* are no keys waiting in the input buffer. */
if
(
ISSET
(
CONST
_UPDATE
)
&&
get_key_buffer_len
()
==
0
)
if
(
ISSET
(
CONST
ANT_SHOW
)
&&
get_key_buffer_len
()
==
0
)
do_cursorpos
(
FALSE
);
/* Refresh just the cursor position or the entire edit window. */
...
...
This diff is collapsed.
Click to expand it.
src/nano.h
View file @
74f12885
...
...
@@ -480,7 +480,7 @@ enum
{
DONTUSE
,
CASE_SENSITIVE
,
CONST
_UPDATE
,
CONST
ANT_SHOW
,
NO_HELP
,
SUSPEND
,
NO_WRAP
,
...
...
This diff is collapsed.
Click to expand it.
src/rcfile.c
View file @
74f12885
...
...
@@ -44,8 +44,8 @@ static const rcoption rcopts[] = {
#ifndef DISABLE_JUSTIFY
{
"brackets"
,
0
},
#endif
{
"const"
,
CONST
_UPDATE
},
/* deprecated form, remove in 2018 */
{
"constantshow"
,
CONST
_UPDATE
},
{
"const"
,
CONST
ANT_SHOW
},
/* deprecated form, remove in 2018 */
{
"constantshow"
,
CONST
ANT_SHOW
},
#ifndef DISABLE_WRAPJUSTIFY
{
"fill"
,
0
},
#endif
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
74f12885
...
...
@@ -2452,7 +2452,7 @@ void do_justify(bool full_justify)
/* If needed, unset the cursor-position suppression flag, so the cursor
* position /will/ be displayed upon a return to the main loop. */
if
(
ISSET
(
CONST
_UPDATE
))
if
(
ISSET
(
CONST
ANT_SHOW
))
do_cursorpos
(
FALSE
);
func
=
func_from_key
(
&
kbinput
);
...
...
@@ -3566,7 +3566,7 @@ void do_verbatim_input(void)
kbinput
=
get_verbatim_kbinput
(
edit
,
&
kbinput_len
);
/* Unsuppress cursor-position display or blank the statusbar. */
if
(
ISSET
(
CONST
_UPDATE
))
if
(
ISSET
(
CONST
ANT_SHOW
))
do_cursorpos
(
FALSE
);
else
{
blank_statusbar
();
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
74f12885
...
...
@@ -1791,7 +1791,7 @@ void check_statusblank(void)
statusblank
--
;
/* When editing and 'constantshow' is active, skip the blanking. */
if
(
currmenu
==
MMAIN
&&
ISSET
(
CONST
_UPDATE
))
if
(
currmenu
==
MMAIN
&&
ISSET
(
CONST
ANT_SHOW
))
return
;
if
(
statusblank
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help