AmendHub

Download:

jcs

/

amend

/

amendments

/

114

committer+editor: Update log scrollbar after cut or paste


jcs made amendment 114 about 1 year ago
--- committer.c Wed Mar 29 11:12:17 2023 +++ committer.c Mon Apr 17 15:35:58 2023 @@ -544,6 +544,8 @@ committer_handle_menu(struct focusable *focusable, sho case EDIT_MENU_CUT_ID: if (committer->last_te == committer->log_te) { TECut(committer->log_te); + UpdateScrollbarForTE(committer->win, + committer->log_scroller, committer->log_te, false); committer_update_menu(committer); } return true; @@ -555,6 +557,8 @@ committer_handle_menu(struct focusable *focusable, sho case EDIT_MENU_PASTE_ID: if (committer->last_te == committer->log_te) { TEPaste(committer->log_te); + UpdateScrollbarForTE(committer->win, + committer->log_scroller, committer->log_te, false); committer_update_menu(committer); } return true; --- editor.c Sat Mar 4 22:39:08 2023 +++ editor.c Mon Apr 17 15:29:01 2023 @@ -394,6 +394,9 @@ editor_handle_menu(struct focusable *focusable, short case EDIT_MENU_CUT_ID: TECut(editor->last_te); editor_update_menu(editor); + if (editor->last_te == editor->log_te) + UpdateScrollbarForTE(editor->win, editor->log_scroller, + editor->last_te, false); return true; case EDIT_MENU_COPY_ID: TECopy(editor->last_te); @@ -401,6 +404,9 @@ editor_handle_menu(struct focusable *focusable, short return true; case EDIT_MENU_PASTE_ID: TEPaste(editor->last_te); + if (editor->last_te == editor->log_te) + UpdateScrollbarForTE(editor->win, editor->log_scroller, + editor->last_te, false); editor_update_menu(editor); return true; case EDIT_MENU_SELECT_ALL_ID: