mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
optimization to avoid complete line scanning searching for tabs if we are really interested for [start, start + columnNumber] range
This commit is contained in:
@@ -301,7 +301,8 @@ public class EditorUtil {
|
||||
boolean useOptimization = true;
|
||||
boolean hasNonTabs = false;
|
||||
boolean hasTabs = false;
|
||||
for (int i = start; i < end; i++) {
|
||||
int scanEndOffset = Math.min(end, start + columnNumber + 1);
|
||||
for (int i = start; i < scanEndOffset; i++) {
|
||||
char c = text.charAt(i);
|
||||
if (debugBuffer != null) {
|
||||
debugBuffer.append(String.format("Found symbol '%c' at the offset %d%n", c, i));
|
||||
|
||||
Reference in New Issue
Block a user