diff --git a/vterm-module.c b/vterm-module.c index 17cf13ef..696a09c9 100644 --- a/vterm-module.c +++ b/vterm-module.c @@ -424,7 +424,7 @@ static int term_resize(int rows, int cols, void *user_data) { /* if rows=term->lines_len, that means term_sb_pop already resize term->lines */ /* if rowslines_len, term_sb_push would resize term->lines there */ - /* we noly need to take care of rows>term->height */ + /* we only need to take care of rows>term->height */ if (rows > term->height) { if (rows > term->lines_len) { @@ -488,8 +488,8 @@ static void refresh_scrollback(Term *term, emacs_env *env) { term->linenum += term->sb_pending; del_cnt = term->linenum - max_line_count; /* extra lines at the bottom */ - /* buf_index is negative,so we move to end of buffer,then backward - -buf_index lines. goto lines backward is effectively when + /* buf_index is negative, so we move to end of buffer, then backward + -buf_index lines. goto lines backward is effective when vterm-max-scrollback is a large number. */ int buf_index = -(term->height + del_cnt); @@ -503,7 +503,7 @@ static void refresh_scrollback(Term *term, emacs_env *env) { del_cnt = term->linenum - max_line_count; if (del_cnt > 0) { term->linenum -= del_cnt; - /* -del_cnt is negative,so we delete_lines from end of buffer. + /* -del_cnt is negative, so we delete_lines from end of buffer. this line means: delete del_cnt count of lines at end of buffer. */ delete_lines(env, -del_cnt, del_cnt, true); @@ -518,7 +518,7 @@ static void adjust_topline(Term *term, emacs_env *env) { VTermPos pos; vterm_state_get_cursorpos(state, &pos); - /* pos.row-term->height is negative,so we backward term->height-pos.row + /* pos.row-term->height is negative, so we backward term->height-pos.row * lines from end of buffer */ diff --git a/vterm.el b/vterm.el index b20a5ea4..22652180 100644 --- a/vterm.el +++ b/vterm.el @@ -43,7 +43,7 @@ ;; emacs-libvterm will downloaded and compiled. In this case, libtool is ;; needed. -;; The reccomended way to install emacs-libvterm is from MELPA. +;; The recommended way to install emacs-libvterm is from MELPA. ;;; Usage @@ -429,7 +429,7 @@ not require any shell-side configuration. See vterm inserts \\='fake\\=' newlines purely for rendering. When using vterm-copy-mode these are in conflict with many emacs functions -like isearch-forward. if this varialbe is not-nil the +like isearch-forward. if this variable is not-nil the fake-newlines are removed on entering copy-mode and re-inserted on leaving copy mode. Also truncate-lines is set to t on entering copy-mode and set to nil on leaving." @@ -995,7 +995,7 @@ additional output received from the underlying process and will behave similarly to buffer in `fundamental-mode'. This mode is typically used to copy text from vterm buffers. -A conventient way to exit `vterm-copy-mode' is with +A convenient way to exit `vterm-copy-mode' is with `vterm-copy-mode-done', which copies the selected text and exit `vterm-copy-mode'." :group 'vterm @@ -1276,7 +1276,7 @@ Provide similar behavior as `insert' for vterm." (accept-process-output vterm--process vterm-timer-delay nil t))) (defun vterm-delete-region (start end) - "Delete the text between START and END for vterm. " + "Delete the text between START and END for vterm." (when vterm--term (save-excursion (when (get-text-property start 'vterm-line-wrap) @@ -1314,9 +1314,9 @@ The return value is `t' when point moved successfully." ;;; Internal (defun vterm--forward-char () - "Move point 1 character forward (). + "Move point 1 character forward. -the return value is `t' when cursor moved." +The return value is `t' when cursor moved." (vterm-reset-cursor-point) (let ((pt (point))) (vterm-send-key "" nil nil nil t) @@ -1340,7 +1340,7 @@ the return value is `t' when cursor moved." (defun vterm--backward-char () "Move point N characters backward. -Return count of moved characeters." +Return count of moved characters." (vterm-reset-cursor-point) (let ((pt (point))) (vterm-send-key "" nil nil nil t) @@ -1815,7 +1815,7 @@ in README." (defun vterm--get-beginning-of-line (&optional pt) "Find the start of the line, bypassing line wraps. -If PT is specified, find it's beginning of the line instead of the beginning +If PT is specified, find its beginning of the line instead of the beginning of the line at cursor." (save-excursion (when pt (goto-char pt)) @@ -1827,8 +1827,8 @@ of the line at cursor." (point))) (defun vterm--get-end-of-line (&optional pt) - "Find the start of the line, bypassing line wraps. -If PT is specified, find it's end of the line instead of the end + "Find the end of the line, bypassing line wraps. +If PT is specified, find its end of the line instead of the end of the line at cursor." (save-excursion (when pt (goto-char pt)) @@ -1863,7 +1863,7 @@ More information see `vterm--prompt-tracking-enabled-p' and (= (point) (or (vterm--get-prompt-point) 0))) (defun vterm-cursor-in-command-buffer-p (&optional pt) - "Check whether cursor in command buffer area." + "Check whether cursor is in command buffer area." (save-excursion (vterm-reset-cursor-point) (let ((promp-pt (vterm--get-prompt-point)))