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
1c46551c
Commit
1c46551c
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
cut: indicate a buffer as modified only if actually something was deleted
This fixes
https://savannah.gnu.org/bugs/?49962
.
parent
f1b87f96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/cut.c
+3
-0
src/cut.c
with
3 additions
and
0 deletions
+3
-0
src/cut.c
View file @
1c46551c
...
...
@@ -125,6 +125,7 @@ void do_cut_text(bool copy_text, bool cut_till_eof)
* before we add text to it. */
bool
old_no_newlines
=
ISSET
(
NO_NEWLINES
);
#endif
size_t
was_totsize
=
openfile
->
totsize
;
assert
(
openfile
->
current
!=
NULL
&&
openfile
->
current
->
data
!=
NULL
);
...
...
@@ -197,6 +198,8 @@ void do_cut_text(bool copy_text, bool cut_till_eof)
UNSET
(
NO_NEWLINES
);
}
else
#endif
/* !NANO_TINY */
/* Only set the modification flag if actually something was cut. */
if
(
openfile
->
totsize
!=
was_totsize
)
set_modified
();
refresh_needed
=
TRUE
;
...
...
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