这是indexloc提供的服务,不要输入任何密码
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -246,4 +246,8 @@ public float getFontWidth() {
public int getFontLineSpacing() {
return mFontLineSpacing;
}

public int getFontLineSpacingAndAscent() {
return mFontLineSpacingAndAscent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public void onDestroyActionMode(ActionMode mode) {
public void onGetContentRect(ActionMode mode, View view, Rect outRect) {
int x1 = Math.round(mSelX1 * terminalView.mRenderer.getFontWidth());
int x2 = Math.round(mSelX2 * terminalView.mRenderer.getFontWidth());
int y1 = Math.round((mSelY1 - 1 - terminalView.getTopRow()) * terminalView.mRenderer.getFontLineSpacing());
int y1 = Math.round((mSelY1 - terminalView.getTopRow()) * terminalView.mRenderer.getFontLineSpacing());
int y2 = Math.round((mSelY2 + 1 - terminalView.getTopRow()) * terminalView.mRenderer.getFontLineSpacing());

if (x1 > x2) {
Expand All @@ -195,7 +195,7 @@ public void onGetContentRect(ActionMode mode, View view, Rect outRect) {
}

int terminalBottom = terminalView.getBottom();
int top = y1 + mHandleHeight;
int top = y1 + terminalView.mRenderer.getFontLineSpacingAndAscent();
int bottom = y2 + mHandleHeight;
if (top > terminalBottom) top = terminalBottom;
if (bottom > terminalBottom) bottom = terminalBottom;
Expand Down