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
07ebba5e
Commit
07ebba5e
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable and invert its logic
parent
9e6e1ebe
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/nano.c
+1
-1
src/nano.c
src/proto.h
+1
-1
src/proto.h
src/text.c
+3
-5
src/text.c
src/winio.c
+7
-7
src/winio.c
with
12 additions
and
14 deletions
+12
-14
src/nano.c
View file @
07ebba5e
...
...
@@ -2671,7 +2671,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
)
do_cursorpos
(
TRU
E
);
do_cursorpos
(
FALS
E
);
/* Refresh just the cursor position or the entire edit window. */
if
(
!
refresh_needed
)
{
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
07ebba5e
...
...
@@ -756,7 +756,7 @@ void adjust_viewport(update_type location);
void
total_redraw
(
void
);
void
total_refresh
(
void
);
void
display_main_list
(
void
);
void
do_cursorpos
(
bool
constant
);
void
do_cursorpos
(
bool
force
);
void
do_cursorpos_void
(
void
);
void
spotlight
(
bool
active
,
const
char
*
word
);
void
xon_complaint
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
07ebba5e
...
...
@@ -2510,7 +2510,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
))
do_cursorpos
(
TRU
E
);
do_cursorpos
(
FALS
E
);
func
=
func_from_key
(
&
kbinput
);
...
...
@@ -3664,11 +3664,9 @@ void do_verbatim_input(void)
/* Read in all the verbatim characters. */
kbinput
=
get_verbatim_kbinput
(
edit
,
&
kbinput_len
);
/* If constant cursor position display is on, make sure the current
* cursor position will be properly displayed on the statusbar.
* Otherwise, blank the statusbar. */
/* Unsuppress cursor-position display or blank the statusbar. */
if
(
ISSET
(
CONST_UPDATE
))
do_cursorpos
(
TRU
E
);
do_cursorpos
(
FALS
E
);
else
{
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
07ebba5e
...
...
@@ -3032,10 +3032,10 @@ void display_main_list(void)
bottombars
(
MMAIN
);
}
/*
If constant is TRUE, we display
the current cursor position on
ly if
*
suppress_cursorpos is FALSE. If constant is FALSE, we display the
*
position always
. In any case
we
reset
suppress_cursorpos to FALSE
. */
void
do_cursorpos
(
bool
constant
)
/*
Show info about
the current cursor position on
the statusbar.
*
Do this unconditionally when force is TRUE; otherwise, only if
*
suppress_cursorpos is FALSE
. In any case
,
reset
the latter
. */
void
do_cursorpos
(
bool
force
)
{
char
saved_byte
;
size_t
sum
,
cur_xpt
=
xplustabs
()
+
1
;
...
...
@@ -3056,8 +3056,8 @@ void do_cursorpos(bool constant)
if
(
openfile
->
current
!=
openfile
->
filebot
)
sum
--
;
/* If the
position
needs to be suppressed, don't suppress it next time. */
if
(
suppress_cursorpos
&&
constant
)
{
/* If the
showing
needs to be suppressed, don't suppress it next time. */
if
(
suppress_cursorpos
&&
!
force
)
{
suppress_cursorpos
=
FALSE
;
return
;
}
...
...
@@ -3081,7 +3081,7 @@ void do_cursorpos(bool constant)
/* Unconditionally display the current cursor position. */
void
do_cursorpos_void
(
void
)
{
do_cursorpos
(
FALS
E
);
do_cursorpos
(
TRU
E
);
}
void
enable_nodelay
(
void
)
...
...
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