Skip to content

Commit

Permalink
Change minimum cols&rows from 8 to 4
Browse files Browse the repository at this point in the history
This avoids e.g. the keyboard overlapping the terminal in setups
that can actually happen. Closes #88.
  • Loading branch information
fornwall committed May 4, 2016
1 parent ff2f77c commit cc7b6cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/termux/view/TerminalView.java
Original file line number Diff line number Diff line change
Expand Up @@ -821,8 +821,8 @@ public void updateSize() {
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);
Expand Down

0 comments on commit cc7b6cb

Please sign in to comment.