@@ -893,7 +893,7 @@ will invert `vterm-copy-exclude-prompt' for that call."
893
893
(when-let ((key (key-description (vector raw-key))))
894
894
(vterm-send-key key shift meta ctrl))))))
895
895
896
- (defun vterm-send-key (key &optional shift meta ctrl )
896
+ (defun vterm-send-key (key &optional shift meta ctrl accept-proc-output )
897
897
" Send KEY to libvterm with optional modifiers SHIFT, META and CTRL."
898
898
(deactivate-mark )
899
899
(when vterm--term
@@ -903,7 +903,8 @@ will invert `vterm-copy-exclude-prompt' for that call."
903
903
(setq key (upcase key)))
904
904
(vterm--update vterm--term key shift meta ctrl)
905
905
(setq vterm--redraw-immididately t )
906
- (accept-process-output vterm--process vterm-timer-delay nil t ))))
906
+ (when accept-proc-output
907
+ (accept-process-output vterm--process vterm-timer-delay nil t )))))
907
908
908
909
(defun vterm-send (key )
909
910
" Send KEY to libvterm. KEY can be anything `kbd' understands."
@@ -1098,7 +1099,7 @@ Provide similar behavior as `insert' for vterm."
1098
1099
(when vterm--term
1099
1100
(if (vterm-goto-char start)
1100
1101
(cl-loop repeat (- end start) do
1101
- (vterm-send-delete))
1102
+ (vterm-send-key " < delete> " nil nil nil t ))
1102
1103
(let ((inhibit-read-only nil ))
1103
1104
(vterm--delete-region start end)))))
1104
1105
@@ -1117,13 +1118,13 @@ It will reset to original position if it can't move there."
1117
1118
(setq cursor-pos (point ))
1118
1119
(setq pt cursor-pos)
1119
1120
(while (and (> pos pt) moved)
1120
- (vterm-send-right)
1121
+ (vterm-send-key " < right> " nil nil nil t )
1121
1122
(setq moved (not (= pt (point ))))
1122
1123
(setq pt (point )))
1123
1124
(setq pt (point ))
1124
1125
(setq moved t )
1125
1126
(while (and (< pos pt) moved)
1126
- (vterm-send-left)
1127
+ (vterm-send-key " < left> " nil nil nil t )
1127
1128
(setq moved (not (= pt (point ))))
1128
1129
(setq pt (point )))
1129
1130
(setq succ (= pos (point )))
0 commit comments