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
0c42c51a
Commit
0c42c51a
authored
6 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename two variables, to indicate better what they mean
parent
f74a1208
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/cut.c
+3
-2
src/cut.c
src/files.c
+2
-2
src/files.c
with
5 additions
and
4 deletions
+5
-4
src/cut.c
View file @
0c42c51a
...
...
@@ -289,7 +289,8 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append)
size_t
cb_save_len
=
0
;
/* The length of the string at the current end of the cutbuffer,
* before we add text to it. */
bool
old_no_newlines
=
ISSET
(
NO_NEWLINES
);
bool
using_magicline
=
!
ISSET
(
NO_NEWLINES
);
/* Whether an automatic newline should be added at end-of-buffer. */
bool
right_side_up
=
TRUE
;
/* There *is* no region, *or* it is marked forward. */
#endif
...
...
@@ -347,7 +348,7 @@ void do_cut_text(bool copy_text, bool marked, bool cut_till_eof, bool append)
openfile
->
placewewant
=
xplustabs
();
}
/* Restore the magic-line behavior now that we're done fiddling. */
if
(
!
old_no_new
line
s
)
if
(
using_magic
line
)
UNSET
(
NO_NEWLINES
);
}
else
#endif
/* !NANO_TINY */
...
...
This diff is collapsed.
Click to expand it.
src/files.c
View file @
0c42c51a
...
...
@@ -557,7 +557,7 @@ void replace_marked_buffer(const char *filename)
{
FILE
*
f
;
int
descriptor
;
bool
old_no_new
line
s
=
ISSET
(
NO_NEWLINES
);
bool
using_magic
line
=
!
ISSET
(
NO_NEWLINES
);
filestruct
*
was_cutbuffer
=
cutbuffer
;
descriptor
=
open_file
(
filename
,
FALSE
,
TRUE
,
&
f
);
...
...
@@ -583,7 +583,7 @@ void replace_marked_buffer(const char *filename)
read_file
(
f
,
descriptor
,
filename
,
TRUE
);
/* Restore the magic-line behavior now that we're done fiddling. */
if
(
!
old_no_new
line
s
)
if
(
using_magic
line
)
UNSET
(
NO_NEWLINES
);
add_undo
(
COUPLE_END
);
...
...
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