public void resize(int width, int height) { defaultScreen.resize(width, height); alternateScreen.resize(width, height); history.resize(width, history.getHeight()); if (cursorX >= width) cursorX = width - 1; if (cursorY >= height) cursorY = height - 1; }