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
14c5f03e
Commit
14c5f03e
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename another constant, to be more precise
parent
1e2d9a69
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/cut.c
+2
-2
src/cut.c
src/nano.h
+1
-1
src/nano.h
src/text.c
+5
-5
src/text.c
with
8 additions
and
8 deletions
+8
-8
src/cut.c
View file @
14c5f03e
...
...
@@ -248,9 +248,9 @@ void do_copy_text(void)
/* Cut from the current cursor position to the end of the file. */
void
do_cut_till_eof
(
void
)
{
add_undo
(
CUT_EOF
);
add_undo
(
CUT_
TO_
EOF
);
do_cut_text
(
FALSE
,
TRUE
);
update_undo
(
CUT_EOF
);
update_undo
(
CUT_
TO_
EOF
);
}
#endif
/* !NANO_TINY */
...
...
This diff is collapsed.
Click to expand it.
src/nano.h
View file @
14c5f03e
...
...
@@ -158,7 +158,7 @@ typedef enum {
}
update_type
;
typedef
enum
{
ADD
,
DEL
,
BACK
,
CUT
,
CUT_EOF
,
REPLACE
,
ADD
,
DEL
,
BACK
,
CUT
,
CUT_
TO_
EOF
,
REPLACE
,
#ifndef DISABLE_WRAPPING
SPLIT_BEGIN
,
SPLIT_END
,
#endif
...
...
This diff is collapsed.
Click to expand it.
src/text.c
View file @
14c5f03e
...
...
@@ -748,7 +748,7 @@ void do_undo(void)
splice_node
(
f
,
t
);
goto_line_posx
(
u
->
lineno
,
u
->
begin
);
break
;
case
CUT_EOF
:
case
CUT_
TO_
EOF
:
case
CUT
:
undidmsg
=
_
(
"text cut"
);
undo_cut
(
u
);
...
...
@@ -926,7 +926,7 @@ void do_redo(void)
renumber
(
f
);
goto_line_posx
(
u
->
mark_begin_lineno
,
u
->
mark_begin_x
);
break
;
case
CUT_EOF
:
case
CUT_
TO_
EOF
:
case
CUT
:
redidmsg
=
_
(
"text cut"
);
redo_cut
(
u
);
...
...
@@ -1261,7 +1261,7 @@ void add_undo(undo_type action)
case
REPLACE
:
u
->
strdata
=
mallocstrcpy
(
NULL
,
openfile
->
current
->
data
);
break
;
case
CUT_EOF
:
case
CUT_
TO_
EOF
:
cutbuffer_reset
();
break
;
case
CUT
:
...
...
@@ -1395,7 +1395,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf
#endif
break
;
}
case
CUT_EOF
:
case
CUT_
TO_
EOF
:
case
CUT
:
if
(
!
cutbuffer
)
break
;
...
...
@@ -1423,7 +1423,7 @@ fprintf(stderr, " >> Updating... action = %d, openfile->last_action = %d, openf
u
->
cutbottom
=
u
->
cutbottom
->
next
;
u
->
lineno
=
u
->
mark_begin_lineno
+
u
->
cutbottom
->
lineno
-
u
->
cutbuffer
->
lineno
;
if
(
ISSET
(
CUT_FROM_CURSOR
)
||
u
->
type
==
CUT_EOF
)
{
if
(
ISSET
(
CUT_FROM_CURSOR
)
||
u
->
type
==
CUT_
TO_
EOF
)
{
u
->
begin
=
strlen
(
u
->
cutbottom
->
data
);
if
(
u
->
lineno
==
u
->
mark_begin_lineno
)
u
->
begin
+=
u
->
mark_begin_x
;
...
...
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