Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Aayush
purr-data
Commits
a088008a
Commit
a088008a
authored
Sep 07, 2014
by
Ivica Bukvic
Browse files
*further refined up/down logic
parent
5247edfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
pd/src/g_rtext.c
View file @
a088008a
...
...
@@ -693,6 +693,7 @@ be printable in whatever 8-bit character set we find ourselves. */
{
//printf("found break\n");
u8_dec
(
x
->
x_buf
,
&
x
->
x_selstart
);
right
++
;
}
while
(
x
->
x_selstart
>
0
&&
(
x
->
x_buf
[
x
->
x_selstart
-
1
]
!=
'\n'
&&
...
...
@@ -701,6 +702,8 @@ be printable in whatever 8-bit character set we find ourselves. */
u8_dec
(
x
->
x_buf
,
&
x
->
x_selstart
);
right
++
;
}
if
(
x
->
x_selstart
==
0
)
right
=
0
;
//printf("first linebreak: right=%d selstart=%d\n", right, x->x_selstart);
if
(
x
->
x_selstart
>
0
)
u8_dec
(
x
->
x_buf
,
&
x
->
x_selstart
);
...
...
@@ -774,9 +777,9 @@ be printable in whatever 8-bit character set we find ourselves. */
u8_inc
(
x
->
x_buf
,
&
x
->
x_selend
);
}
//printf("increase by 1: selend=%d\n", x->x_selend);
while
(
right
>
0
&&
x
->
x_selend
+
1
<
x
->
x_bufsize
&&
(
x
->
x_buf
[
x
->
x_selend
+
1
]
!=
'\n'
&&
x
->
x_buf
[
x
->
x_selend
+
1
]
!=
'\v'
))
while
(
right
>
0
&&
x
->
x_selend
<
x
->
x_bufsize
&&
(
x
->
x_buf
[
x
->
x_selend
]
!=
'\n'
&&
x
->
x_buf
[
x
->
x_selend
]
!=
'\v'
))
{
u8_inc
(
x
->
x_buf
,
&
x
->
x_selend
);
right
--
;
...
...
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