emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/long-lines-cleanup c0b9530862c: Another final fix to last change


From: Gregory Heytings
Subject: scratch/long-lines-cleanup c0b9530862c: Another final fix to last changes
Date: Sat, 1 Apr 2023 19:10:01 -0400 (EDT)

branch: scratch/long-lines-cleanup
commit c0b9530862c2f27a23ad058d60171e06de3e9b50
Author: Gregory Heytings <gregory@heytings.org>
Commit: Gregory Heytings <gregory@heytings.org>

    Another final fix to last changes
    
    * src/xdisp.c (get_small_narrowing_begv): Refine the value of 'bol_pos'.
---
 src/xdisp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xdisp.c b/src/xdisp.c
index 940b8dc820e..30a32896aba 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -3644,7 +3644,7 @@ ptrdiff_t
 get_small_narrowing_begv (struct window *w, ptrdiff_t pos)
 {
   int len = get_narrowed_width (w);
-  ptrdiff_t bol_pos = get_nearby_bol_pos (pos);
+  ptrdiff_t bol_pos = max (get_nearby_bol_pos (pos), BEGV);
   return max (bol_pos + ((pos - bol_pos) / len - 1) * len, BEGV);
 }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]