diff src/popupmenu.c @ 32979:a506ab420306

patch 9.0.1784: redundant else in pum_set_selected() Commit: https://github.com/vim/vim/commit/c51fa7bc4666baad81356b298da7a5ede410f868 Author: mathew <glephunter@gmail.com> Date: Wed Aug 23 20:55:17 2023 +0200 patch 9.0.1784: redundant else in pum_set_selected() Problem: redundant else in pum_set_selected() Solution: Remove it closes: #12893 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: mathew <glephunter@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 24 Aug 2023 07:43:12 +0200
parents 695b50472e85
children 3083c26bdc3d
line wrap: on
line diff
--- a/src/popupmenu.c
+++ b/src/popupmenu.c
@@ -920,13 +920,10 @@ pum_set_selected(int n, int repeat UNUSE
 			    ml_append(lnum++, p, 0, FALSE);
 			    break;
 			}
-			else
-			{
-			    *e = NUL;
-			    ml_append(lnum++, p, (int)(e - p + 1), FALSE);
-			    *e = '\n';
-			    p = e + 1;
-			}
+			*e = NUL;
+			ml_append(lnum++, p, (int)(e - p + 1), FALSE);
+			*e = '\n';
+			p = e + 1;
 		    }
 		    // delete the empty last line
 		    ml_delete(curbuf->b_ml.ml_line_count);