mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-201625 Text jitter in editor when tabs are used for indentation (on a fractional-scale monitor on Windows)
This commit is contained in:
@@ -358,10 +358,10 @@ public final class EditorUtil {
|
||||
if (tabSize <= 0) {
|
||||
return x + plainSpaceWidth;
|
||||
}
|
||||
tabSize *= plainSpaceWidth;
|
||||
float tabSizePixels = tabSize * plainSpaceWidth;
|
||||
|
||||
int nTabs = (int) (x / tabSize);
|
||||
return (nTabs + 1) * tabSize;
|
||||
int nTabs = (int) (x / tabSizePixels);
|
||||
return (nTabs + 1) * tabSizePixels;
|
||||
}
|
||||
|
||||
public static int textWidthInColumns(@NotNull Editor editor, @NotNull CharSequence text, int start, int end, int x) {
|
||||
|
||||
Reference in New Issue
Block a user