mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a shorter fix for console being cleared when inserting small text after a very large text (IDEA-CR-65713)
GitOrigin-RevId: f31c0e75b6c6c04632cb1e3919746b5818677374
This commit is contained in:
committed by
intellij-monorepo-bot
parent
49c95c1410
commit
e8f3e8616b
@@ -104,10 +104,10 @@ final class TokenBuffer {
|
||||
// toss tokens from the beginning until size became < maxCapacity
|
||||
while (size - startIndex > maxCapacity) {
|
||||
TokenInfo info = tokens.getFirst();
|
||||
int length = info.length() - startIndex;
|
||||
if (length > size - maxCapacity - startIndex) {
|
||||
int length = info.length();
|
||||
if (length > size - maxCapacity) {
|
||||
// slice a part of this info
|
||||
startIndex += size - maxCapacity - startIndex;
|
||||
startIndex = size - maxCapacity;
|
||||
break;
|
||||
}
|
||||
startIndex = 0;
|
||||
|
||||
Reference in New Issue
Block a user