mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-171674 First tab is very short in the left Diff pane
This commit is contained in:
@@ -359,7 +359,8 @@ public final class EditorUtil {
|
||||
}
|
||||
|
||||
public static int nextTabStop(int x, @NotNull Editor editor, int tabSize) {
|
||||
return nextTabStop(x, getSpaceWidth(Font.PLAIN, editor), tabSize);
|
||||
int leftInset = editor.getContentComponent().getInsets().left;
|
||||
return nextTabStop(x - leftInset, getSpaceWidth(Font.PLAIN, editor), tabSize) + leftInset;
|
||||
}
|
||||
|
||||
public static int nextTabStop(int x, int plainSpaceWidth, int tabSize) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -109,6 +109,7 @@ class TabFragment implements LineFragment {
|
||||
}
|
||||
|
||||
private float getNextTabStop(float x) {
|
||||
return EditorUtil.nextTabStop((int)x, myView.getPlainSpaceWidth(), myView.getTabSize());
|
||||
int leftInset = myView.getInsets().left;
|
||||
return EditorUtil.nextTabStop((int)x - leftInset, myView.getPlainSpaceWidth(), myView.getTabSize()) + leftInset;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user