[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/coterm c535023 36/80: Safeguard against negative values
From: |
ELPA Syncer |
Subject: |
[elpa] externals/coterm c535023 36/80: Safeguard against negative values in move-to-column |
Date: |
Wed, 13 Oct 2021 18:57:31 -0400 (EDT) |
branch: externals/coterm
commit c5350235c43cd8884237d8bd712d30eb1e3b42b4
Author: m <>
Commit: m <>
Safeguard against negative values in move-to-column
---
coterm.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/coterm.el b/coterm.el
index 29d1ad4..bf1a7a4 100644
--- a/coterm.el
+++ b/coterm.el
@@ -242,13 +242,17 @@ buffer and the scrolling region must cover the whole
screen."
(let ((column (current-column)))
(if (zerop newlines)
(if coterm--t-insert-mode
+ ;; In insert mode, delete text outside the width of the terminal
(progn
(move-to-column coterm--t-width)
(delete-region
(point) (progn (forward-line 1) (1- (point)))))
- (delete-region
- (point)
- (progn (move-to-column (- (* 2 column) coterm--t-col)) (point))))
+ ;; If not in insert mode, replace text
+ (when (> column coterm--t-col)
+ (delete-region
+ (point)
+ (progn (move-to-column (- (* 2 column) coterm--t-col))
+ (point)))))
(cl-incf coterm--t-row newlines)
;; We've inserted newlines, so we must scroll if necessary
(when (>= coterm--t-row coterm--t-height)
- [elpa] externals/coterm 7941200 61/80: Describe package, (continued)
- [elpa] externals/coterm 7941200 61/80: Describe package, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm e268359 59/80: Account for home marker reposition when clearing screen, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 8a5ffd9 68/80: Fix 'coterm--t-goto' for column zero, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 11a9594 78/80: [auto-char] Detect prompts from "less -M", ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 8ca9291 71/80: Minor fixes to description, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 07a2570 69/80: Work around a line wrapping issue with "less", ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 139e8d0 79/80: Fix for Emacs 27, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 5aea1c8 25/80: Fixup some comments, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm f48ef18 26/80: Fix \e[M and \e[L outside scrolling region, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 3599955 35/80: Fixes for documentation and compiler warnings, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm c535023 36/80: Safeguard against negative values in move-to-column,
ELPA Syncer <=
- [elpa] externals/coterm b35e077 40/80: Reorganize file, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 2358124 48/80: Try to enter and leave char-mode automatically, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 13dd76a 51/80: Adjust mpv prompt detecting regexp, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm 34d8808 54/80: Improve less prompt regexp, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm dd06737 55/80: Improve regexp matching mpv prompt, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm da8019b 80/80: Simplify narrowing to process output, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm ab99084 76/80: [auto-char] "less" prompt may be an empty line if it is slow, ELPA Syncer, 2021/10/13
- [elpa] externals/coterm be23cf4 72/80: Prepare submission to ELPA, ELPA Syncer, 2021/10/13