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
b574f73e
Commit
b574f73e
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: add a separate function that actually wipes the status bar
parent
eac90c3e
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
src/files.c
+2
-4
src/files.c
src/nano.c
+1
-2
src/nano.c
src/prompt.c
+2
-3
src/prompt.c
src/proto.h
+1
-0
src/proto.h
src/search.c
+1
-2
src/search.c
src/text.c
+5
-10
src/text.c
src/winio.c
+9
-4
src/winio.c
with
21 additions
and
25 deletions
+21
-25
src/files.c
View file @
b574f73e
...
...
@@ -372,8 +372,7 @@ int do_lockfile(const char *filename)
free
(
promptstr
);
if
(
response
<
1
)
{
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
goto
free_the_name
;
}
}
...
...
@@ -2218,8 +2217,7 @@ int do_writeout(bool exiting, bool withprompt)
response
=
do_yesno_prompt
(
FALSE
,
_
(
"File was modified "
"since you opened it; continue saving? "
));
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
/* When in tool mode and not called by 'savefile',
* overwrite the file right here when requested. */
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
b574f73e
...
...
@@ -710,8 +710,7 @@ void window_init(void)
}
/* In case the terminal shrunk, make sure the status line is clear. */
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
/* Turn the keypad on for the windows, if necessary. */
if
(
!
ISSET
(
REBIND_KEYPAD
))
{
...
...
This diff is collapsed.
Click to expand it.
src/prompt.c
View file @
b574f73e
...
...
@@ -651,8 +651,7 @@ int do_prompt(bool allow_tabs, bool allow_files,
else
if
(
func
==
do_enter
)
retval
=
(
*
answer
==
'\0'
)
?
-
2
:
0
;
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
#ifdef ENABLE_TABCOMP
/* If we've done tab completion, there might still be a list of
...
...
@@ -720,8 +719,8 @@ int do_yesno_prompt(bool all, const char *msg)
blank_statusbar
();
mvwaddnstr
(
bottomwin
,
0
,
0
,
message
,
actual_x
(
message
,
COLS
-
1
));
wattroff
(
bottomwin
,
interface_color_pair
[
TITLE_BAR
]);
wnoutrefresh
(
bottomwin
);
currmenu
=
MYESNO
;
/* When not replacing, show the cursor while waiting for a key. */
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
b574f73e
...
...
@@ -642,6 +642,7 @@ const sc *get_shortcut(int *kbinput);
void
blank_row
(
WINDOW
*
win
,
int
y
,
int
x
,
int
n
);
void
blank_edit
(
void
);
void
blank_statusbar
(
void
);
void
wipe_statusbar
(
void
);
void
blank_bottombars
(
void
);
void
check_statusblank
(
void
);
char
*
display_string
(
const
char
*
buf
,
size_t
column
,
size_t
span
,
bool
isdata
);
...
...
This diff is collapsed.
Click to expand it.
src/search.c
View file @
b574f73e
...
...
@@ -347,8 +347,7 @@ int findnextstr(const char *needle, bool whole_word_only, int modus,
/* Wipe the "Searching..." message and unset the suppression flag. */
if
(
feedback
>
0
)
{
blank_statusbar
();
wrefresh
(
bottomwin
);
wipe_statusbar
();
suppress_cursorpos
=
FALSE
;
}
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
b574f73e
...
...
@@ -2502,8 +2502,7 @@ void do_justify(bool full_justify)
/* Mark the buffer for unjustified text as empty. */
jusbuffer
=
NULL
;
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
/* Show "Uncut" again in the help lines, and force their redrawing. */
uncutfunc
->
desc
=
uncut_tag
;
...
...
@@ -3322,8 +3321,7 @@ void do_linter(void)
}
}
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
#ifndef NANO_TINY
free_lints_and_return:
...
...
@@ -3546,10 +3544,8 @@ void do_verbatim_input(void)
/* Unsuppress cursor-position display or blank the statusbar. */
if
(
ISSET
(
CONSTANT_SHOW
))
suppress_cursorpos
=
FALSE
;
else
{
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
}
else
wipe_statusbar
();
/* Display all the verbatim characters at once, not filtering out
* control characters. */
...
...
@@ -3622,8 +3618,7 @@ void complete_a_word(void)
pletion_x
=
0
;
/* Wipe the "No further matches" message. */
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
wipe_statusbar
();
}
else
{
/* Remove the attempted completion from the buffer. */
do_undo
();
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
b574f73e
...
...
@@ -1810,6 +1810,13 @@ void blank_statusbar(void)
blank_row
(
bottomwin
,
0
,
0
,
COLS
);
}
/* Wipe the status bar clean and include this in the next screen update. */
void
wipe_statusbar
(
void
)
{
blank_row
(
bottomwin
,
0
,
0
,
COLS
);
wnoutrefresh
(
bottomwin
);
}
/* If the NO_HELP flag isn't set, blank the last two lines of the bottom
* portion of the window. */
void
blank_bottombars
(
void
)
...
...
@@ -1834,10 +1841,8 @@ void check_statusblank(void)
if
(
currmenu
==
MMAIN
&&
ISSET
(
CONSTANT_SHOW
))
return
;
if
(
statusblank
==
0
)
{
blank_statusbar
();
wnoutrefresh
(
bottomwin
);
}
if
(
statusblank
==
0
)
wipe_statusbar
();
/* If the subwindows overlap, make sure to show the edit window now. */
if
(
LINES
==
1
)
...
...
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