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
17fb6dfd
Commit
17fb6dfd
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: reshuffle two lines and improve two comments
parent
95f417fa
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nano.c
+6
-6
src/nano.c
with
6 additions
and
6 deletions
+6
-6
src/nano.c
View file @
17fb6dfd
...
...
@@ -437,14 +437,14 @@ void copy_from_filestruct(filestruct *somebuffer)
#endif
/* Partition the filestruct so that it contains no text, and remember
* whether the
top of the edi
t
w
in
dow
is at the
start
of the
buffer
. */
* whether the
curren
t
l
in
e
is at the
top
of the
edit window
. */
filepart
=
partition_filestruct
(
openfile
->
current
,
openfile
->
current_x
,
openfile
->
current
,
openfile
->
current_x
);
edittop_inside
=
(
openfile
->
edittop
==
openfile
->
fileage
);
free_filestruct
(
openfile
->
fileage
);
/* Put the top and bottom of the current filestruct at the top and
* bottom of a copy of the passed buffer. */
free_filestruct
(
openfile
->
fileage
);
openfile
->
fileage
=
copy_filestruct
(
somebuffer
);
openfile
->
filebot
=
openfile
->
fileage
;
while
(
openfile
->
filebot
->
next
!=
NULL
)
...
...
@@ -487,13 +487,13 @@ void copy_from_filestruct(filestruct *somebuffer)
* tacked onto the current line. */
openfile
->
current_y
+=
openfile
->
filebot
->
lineno
-
1
;
top_save
=
openfile
->
fileage
;
/* If the top of the edit window is inside the partition, set it to
* where the copied text now starts. */
/* If we pasted onto the first line of the edit window, the corresponding
* struct has been freed, so... point at the start of the copied text. */
if
(
edittop_inside
)
openfile
->
edittop
=
openfile
->
fileage
;
top_save
=
openfile
->
fileage
;
/* Unpartition the filestruct so that it contains all the text
* again, plus the copied text. */
unpartition_filestruct
(
&
filepart
);
...
...
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