diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index 79ee123..b8e8d6d 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/Command.cc b/Command.cc index 4a7e3f4..51152a8 100644 --- a/Command.cc +++ b/Command.cc @@ -83,8 +83,12 @@ ensure_cursor_visible(const Editor &ed, Buffer &buf) rowoffs = cury - content_rows + 1; } - // Clamp vertical offset to available content - const auto total_rows = buf.Nrows(); + // Clamp vertical offset to available content. Use the materialized rows cache + // because some legacy editing commands still modify Buffer::Rows() directly. + // TerminalRenderer also renders from Buffer::Rows(), so keeping viewport math + // consistent with that avoids desync where the cursor goes off-screen when + // inserting newlines at EOF. + const auto total_rows = buf.Rows().size(); if (content_rows < total_rows) { std::size_t max_rowoffs = total_rows - content_rows; if (rowoffs > max_rowoffs) diff --git a/make-app-release b/make-app-release index 48dbe0a..a3b2813 100755 --- a/make-app-release +++ b/make-app-release @@ -23,7 +23,7 @@ make clean rm -fr kge.app* kge-qt.app* make mv kge.app kge-qt.app -macdeployqt -always-overwrite kge-qt.app +macdeployqt kge-qt.app -always-overwrite zip -r kge-qt.app.zip kge-qt.app sha256sum kge-qt.app.zip open .