Commit 31bdc9c
committed
Snap point to buffer end on scroll-on-input
When point is in scrollback (e.g. after pixel-scroll-precision-mode, mouse
wheel, M-v, or any scrolling command that moves point) and the user types or
pastes, ghostel--scroll-bottom resets the terminal viewport but leaves Emacs
point above viewport-start. The delayed redraw then preserves point via
saved-marker and skips the set-window-start anchor, so the window stays showing
scrollback.
Factor the terminal-viewport reset + point snap + redraw bump into
ghostel--snap-to-input, and call it from self-insert, send-event, and the shared
paste/yank/drop path (ghostel--paste-text). The terminal-engine
responsibility (scroll-bottom) stays in the native module; the Emacs-buffer
responsibility (goto-char) stays in Elisp, with one composition point.
Fixes #1131 parent a7139d5 commit 31bdc9c
2 files changed
Lines changed: 71 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
1060 | 1074 | | |
1061 | 1075 | | |
1062 | 1076 | | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
| 1077 | + | |
1066 | 1078 | | |
1067 | 1079 | | |
1068 | 1080 | | |
| |||
1076 | 1088 | | |
1077 | 1089 | | |
1078 | 1090 | | |
1079 | | - | |
1080 | | - | |
1081 | | - | |
| 1091 | + | |
1082 | 1092 | | |
1083 | 1093 | | |
1084 | 1094 | | |
| |||
1155 | 1165 | | |
1156 | 1166 | | |
1157 | 1167 | | |
| 1168 | + | |
1158 | 1169 | | |
1159 | 1170 | | |
1160 | 1171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3703 | 3703 | | |
3704 | 3704 | | |
3705 | 3705 | | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
3712 | 3716 | | |
3713 | 3717 | | |
3714 | 3718 | | |
| |||
3720 | 3724 | | |
3721 | 3725 | | |
3722 | 3726 | | |
3723 | | - | |
3724 | | - | |
3725 | | - | |
3726 | | - | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
3727 | 3735 | | |
3728 | 3736 | | |
3729 | 3737 | | |
| |||
3735 | 3743 | | |
3736 | 3744 | | |
3737 | 3745 | | |
3738 | | - | |
3739 | | - | |
3740 | | - | |
3741 | | - | |
3742 | | - | |
| 3746 | + | |
| 3747 | + | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
| 3751 | + | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
| 3775 | + | |
| 3776 | + | |
| 3777 | + | |
| 3778 | + | |
| 3779 | + | |
| 3780 | + | |
3743 | 3781 | | |
3744 | 3782 | | |
3745 | 3783 | | |
| |||
4349 | 4387 | | |
4350 | 4388 | | |
4351 | 4389 | | |
| 4390 | + | |
4352 | 4391 | | |
4353 | 4392 | | |
4354 | 4393 | | |
| |||
0 commit comments