Skip to content
GitLab
Menu
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
3dc6ccbe
Commit
3dc6ccbe
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a function, to be more accurate
Because nothing gets reset to zero or to some initial value.
parent
b98545f4
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
src/cut.c
+2
-2
src/cut.c
src/files.c
+2
-2
src/files.c
src/nano.c
+1
-1
src/nano.c
src/proto.h
+1
-1
src/proto.h
src/text.c
+3
-3
src/text.c
src/winio.c
+4
-4
src/winio.c
with
13 additions
and
13 deletions
+13
-13
src/cut.c
View file @
3dc6ccbe
...
...
@@ -291,8 +291,8 @@ void do_uncut_text(void)
/* Mark the file as modified. */
set_modified
();
/* Update
the cursor position
to account for the inserted lines. */
reset
_cursor
();
/* Update
current_y
to account for the inserted lines. */
place_the
_cursor
();
refresh_needed
=
TRUE
;
...
...
This diff is collapsed.
Click to expand it.
src/files.c
View file @
3dc6ccbe
...
...
@@ -1200,8 +1200,8 @@ void do_insertfile(void)
openfile
->
current_x
!=
was_current_x
)
set_modified
();
/* Update
the cursor position
to account for inserted lines. */
reset
_cursor
();
/* Update
current_y
to account for inserted lines. */
place_the
_cursor
();
refresh_needed
=
TRUE
;
}
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
3dc6ccbe
...
...
@@ -2665,7 +2665,7 @@ int main(int argc, char **argv)
/* Refresh just the cursor position or the entire edit window. */
if
(
!
refresh_needed
)
{
reset
_cursor
();
place_the
_cursor
();
wnoutrefresh
(
edit
);
}
else
edit_refresh
();
...
...
This diff is collapsed.
Click to expand it.
src/proto.h
View file @
3dc6ccbe
...
...
@@ -640,7 +640,7 @@ void warn_and_shortly_pause(const char *msg);
void
statusline
(
message_type
importance
,
const
char
*
msg
,
...);
void
bottombars
(
int
menu
);
void
onekey
(
const
char
*
keystroke
,
const
char
*
desc
,
int
length
);
void
reset
_cursor
(
void
);
void
place_the
_cursor
(
void
);
void
edit_draw
(
filestruct
*
fileptr
,
const
char
*
converted
,
int
line
,
size_t
from_col
);
int
update_line
(
filestruct
*
fileptr
,
size_t
index
);
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
3dc6ccbe
...
...
@@ -2443,7 +2443,7 @@ void do_justify(bool full_justify)
do
{
#endif
statusbar
(
_
(
"Can now UnJustify!"
));
reset
_cursor
();
place_the
_cursor
();
curs_set
(
1
);
kbinput
=
do_input
(
FALSE
);
#ifndef NANO_TINY
...
...
@@ -3315,7 +3315,7 @@ void do_linter(void)
}
/* Place and show the cursor to indicate the affected line. */
reset
_cursor
();
place_the
_cursor
();
wnoutrefresh
(
edit
);
curs_set
(
1
);
...
...
@@ -3559,7 +3559,7 @@ void do_verbatim_input(void)
/* TRANSLATORS: This is displayed when the next keystroke will be
* inserted verbatim. */
statusbar
(
_
(
"Verbatim Input"
));
reset
_cursor
();
place_the
_cursor
();
curs_set
(
1
);
/* Read in all the verbatim characters. */
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
3dc6ccbe
...
...
@@ -1235,7 +1235,7 @@ int parse_escape_sequence(WINDOW *win, int kbinput)
suppress_cursorpos
=
FALSE
;
lastmessage
=
HUSH
;
if
(
currmenu
==
MMAIN
)
{
reset
_cursor
();
place_the
_cursor
();
curs_set
(
1
);
}
}
...
...
@@ -2278,7 +2278,7 @@ void onekey(const char *keystroke, const char *desc, int length)
/* Redetermine current_y from the position of current relative to edittop,
* and put the cursor in the edit window at (current_y, "current_x"). */
void
reset
_cursor
(
void
)
void
place_the
_cursor
(
void
)
{
ssize_t
row
=
0
;
size_t
col
,
xpt
=
xplustabs
();
...
...
@@ -3087,7 +3087,7 @@ void edit_refresh(void)
while
(
row
<
editwinrows
)
blank_row
(
edit
,
row
++
,
0
,
COLS
);
reset
_cursor
();
place_the
_cursor
();
wnoutrefresh
(
edit
);
refresh_needed
=
FALSE
;
...
...
@@ -3255,7 +3255,7 @@ void spotlight(bool active, const char *word)
room
--
;
}
reset
_cursor
();
place_the
_cursor
();
if
(
active
)
wattron
(
edit
,
hilite_attribute
);
...
...
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