diff src/change.c @ 27706:17cd22b7151b v8.2.4379

patch 8.2.4379: an empty change is reported to a listener Commit: https://github.com/vim/vim/commit/55737c2a31ed450dd7bf2a9c587adfbb32b755bb Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 14 14:51:22 2022 +0000 patch 8.2.4379: an empty change is reported to a listener Problem: An empty change is reported to a listener. Solution: Do not report an empty change. (closes https://github.com/vim/vim/issues/9768) Remove unused return value.
author Bram Moolenaar <Bram@vim.org>
date Mon, 14 Feb 2022 16:00:03 +0100
parents 3ad379c0ab28
children 1f37e5082343
line wrap: on
line diff
--- a/src/change.c
+++ b/src/change.c
@@ -155,9 +155,8 @@ static long next_listener_id = 0;
 /*
  * Check if the change at "lnum" is above or overlaps with an existing
  * change. If above then flush changes and invoke listeners.
- * Returns TRUE if the change was merged.
  */
-    static int
+    static void
 check_recorded_changes(
 	buf_T		*buf,
 	linenr_T	lnum,
@@ -185,7 +184,6 @@ check_recorded_changes(
 	    }
 	}
     }
-    return FALSE;
 }
 
 /*
@@ -206,8 +204,7 @@ may_record_change(
 
     // If the new change is going to change the line numbers in already listed
     // changes, then flush.
-    if (check_recorded_changes(curbuf, lnum, lnume, xtra))
-	return;
+    check_recorded_changes(curbuf, lnum, lnume, xtra);
 
     if (curbuf->b_recorded_changes == NULL)
     {