diff options
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index 8074223b..19fba3a4 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -164,7 +164,7 @@ iRangei union_Rangei(iRangei a, iRangei b) { | |||
164 | return (iRangei){ iMin(a.start, b.start), iMax(a.end, b.end) }; | 164 | return (iRangei){ iMin(a.start, b.start), iMax(a.end, b.end) }; |
165 | } | 165 | } |
166 | 166 | ||
167 | static iBool isSelectionBreakingChar_(iChar c) { | 167 | iBool isSelectionBreaking_Char(iChar c) { |
168 | return isSpace_Char(c) || (c == '@' || c == '-' || c == '/' || c == '\\' || c == ','); | 168 | return isSpace_Char(c) || (c == '@' || c == '-' || c == '/' || c == '\\' || c == ','); |
169 | } | 169 | } |
170 | 170 | ||
@@ -173,7 +173,7 @@ static const char *moveBackward_(const char *pos, iRangecc bounds, int mode) { | |||
173 | while (pos > bounds.start) { | 173 | while (pos > bounds.start) { |
174 | int len = decodePrecedingBytes_MultibyteChar(pos, bounds.start, &ch); | 174 | int len = decodePrecedingBytes_MultibyteChar(pos, bounds.start, &ch); |
175 | if (len > 0) { | 175 | if (len > 0) { |
176 | if (mode & word_RangeExtension && isSelectionBreakingChar_(ch)) break; | 176 | if (mode & word_RangeExtension && isSelectionBreaking_Char(ch)) break; |
177 | if (mode & line_RangeExtension && ch == '\n') break; | 177 | if (mode & line_RangeExtension && ch == '\n') break; |
178 | pos -= len; | 178 | pos -= len; |
179 | } | 179 | } |
@@ -187,7 +187,7 @@ static const char *moveForward_(const char *pos, iRangecc bounds, int mode) { | |||
187 | while (pos < bounds.end) { | 187 | while (pos < bounds.end) { |
188 | int len = decodeBytes_MultibyteChar(pos, bounds.end, &ch); | 188 | int len = decodeBytes_MultibyteChar(pos, bounds.end, &ch); |
189 | if (len > 0) { | 189 | if (len > 0) { |
190 | if (mode & word_RangeExtension && isSelectionBreakingChar_(ch)) break; | 190 | if (mode & word_RangeExtension && isSelectionBreaking_Char(ch)) break; |
191 | if (mode & line_RangeExtension && ch == '\n') break; | 191 | if (mode & line_RangeExtension && ch == '\n') break; |
192 | pos += len; | 192 | pos += len; |
193 | } | 193 | } |