mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-07 03:05:18 +08:00
Change minimum cols&rows from 8 to 4
This avoids e.g. the keyboard overlapping the terminal in setups that can actually happen. Closes #88.
This commit is contained in:
@@ -821,8 +821,8 @@ public final class TerminalView extends View {
|
||||
if (viewWidth == 0 || viewHeight == 0 || mTermSession == null) return;
|
||||
|
||||
// Set to 80 and 24 if you want to enable vttest.
|
||||
int newColumns = Math.max(8, (int) (viewWidth / mRenderer.mFontWidth));
|
||||
int newRows = Math.max(8, (viewHeight - mRenderer.mFontLineSpacingAndAscent) / mRenderer.mFontLineSpacing);
|
||||
int newColumns = Math.max(4, (int) (viewWidth / mRenderer.mFontWidth));
|
||||
int newRows = Math.max(4, (viewHeight - mRenderer.mFontLineSpacingAndAscent) / mRenderer.mFontLineSpacing);
|
||||
|
||||
if (mEmulator == null || (newColumns != mEmulator.mColumns || newRows != mEmulator.mRows)) {
|
||||
mTermSession.updateSize(newColumns, newRows);
|
||||
|
Reference in New Issue
Block a user