diff --git a/src/misc2.c b/src/misc2.c
index d16fb46..3067414 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -673,25 +673,27 @@
 }
 
 /*
- * When curwin->w_leftcol has changed, adjust the cursor position.
+ * Set "curwin->w_leftcol" to "leftcol".
+ * Adjust the cursor position if needed.
  * Return TRUE if the cursor was moved.
  */
     int
-leftcol_changed(void)
+set_leftcol(colnr_T leftcol)
 {
-    long	lastcol;
-    colnr_T	s, e;
     int		retval = FALSE;
-    long	siso = get_sidescrolloff_value();
+
+    // Return quickly when there is no change.
+    if (curwin->w_leftcol == leftcol)
+	return FALSE;
+    curwin->w_leftcol = leftcol;
 
     changed_cline_bef_curs();
-    lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1;
+    long lastcol = curwin->w_leftcol + curwin->w_width - curwin_col_off() - 1;
     validate_virtcol();
 
-    /*
-     * If the cursor is right or left of the screen, move it to last or first
-     * character.
-     */
+    // If the cursor is right or left of the screen, move it to last or first
+    // visible character.
+    long siso = get_sidescrolloff_value();
     if (curwin->w_virtcol > (colnr_T)(lastcol - siso))
     {
 	retval = TRUE;
@@ -703,11 +705,10 @@
 	(void)coladvance((colnr_T)(curwin->w_leftcol + siso));
     }
 
-    /*
-     * If the start of the character under the cursor is not on the screen,
-     * advance the cursor one more char.  If this fails (last char of the
-     * line) adjust the scrolling.
-     */
+    // If the start of the character under the cursor is not on the screen,
+    // advance the cursor one more char.  If this fails (last char of the
+    // line) adjust the scrolling.
+    colnr_T	s, e;
     getvvcol(curwin, &curwin->w_cursor, &s, NULL, &e);
     if (e > (colnr_T)lastcol)
     {
diff --git a/src/mouse.c b/src/mouse.c
index 5ebf125..8348ba1 100644
--- a/src/mouse.c
+++ b/src/mouse.c
@@ -2035,8 +2035,6 @@
     if (curwin->w_leftcol == (colnr_T)leftcol)
 	return FALSE;  // already there
 
-    curwin->w_leftcol = (colnr_T)leftcol;
-
     // When the line of the cursor is too short, move the cursor to the
     // longest visible line.
     if (
@@ -2050,7 +2048,7 @@
 	curwin->w_cursor.col = 0;
     }
 
-    return leftcol_changed();
+    return set_leftcol((colnr_T)leftcol);
 }
 
 /*
@@ -2098,7 +2096,7 @@
 	send_keys_to_term(curbuf->b_term, cap->cmdchar, mod_mask, FALSE);
     else
 # endif
-    // For insert mode, don't scroll the window in which completion is being
+    // For Insert mode, don't scroll the window in which completion is being
     // done.
     if (mode == MODE_NORMAL || !pum_visible() || curwin != old_curwin)
     {
diff --git a/src/normal.c b/src/normal.c
index 79f1686..5000f53 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1930,11 +1930,8 @@
 	}
 
 	// do the horizontal scroll
-	if (want_hor && curwin->w_leftcol != tgt_leftcol)
-	{
-	    curwin->w_leftcol = tgt_leftcol;
-	    leftcol_changed();
-	}
+	if (want_hor)
+	    (void)set_leftcol(tgt_leftcol);
     }
 
     // reset current-window
@@ -2458,7 +2455,7 @@
 	scrollup(count, TRUE);
     else
 	scrolldown(count, TRUE);
-    if (get_scrolloff_value())
+    if (get_scrolloff_value() > 0)
     {
 	// Adjust the cursor position for 'scrolloff'.  Mark w_topline as
 	// valid, otherwise the screen jumps back at the end of the file.
@@ -2734,28 +2731,19 @@
     case 'h':
     case K_LEFT:
 		if (!curwin->w_p_wrap)
-		{
-		    if ((colnr_T)cap->count1 > curwin->w_leftcol)
-			curwin->w_leftcol = 0;
-		    else
-			curwin->w_leftcol -= (colnr_T)cap->count1;
-		    leftcol_changed();
-		}
+		    (void)set_leftcol((colnr_T)cap->count1 > curwin->w_leftcol
+			       ? 0 : curwin->w_leftcol - (colnr_T)cap->count1);
 		break;
 
-		// "zL" - scroll screen left half-page
+		// "zL" - scroll window left half-page
     case 'L':	cap->count1 *= curwin->w_width / 2;
 		// FALLTHROUGH
 
-		// "zl" - scroll screen to the left
+		// "zl" - scroll window to the left if not wrapping
     case 'l':
     case K_RIGHT:
 		if (!curwin->w_p_wrap)
-		{
-		    // scroll the window left
-		    curwin->w_leftcol += (colnr_T)cap->count1;
-		    leftcol_changed();
-		}
+		    (void)set_leftcol(curwin->w_leftcol + (colnr_T)cap->count1);
 		break;
 
 		// "zs" - scroll screen, cursor at the start
diff --git a/src/proto/misc2.pro b/src/proto/misc2.pro
index 3d3a5a6..f596ffa 100644
--- a/src/proto/misc2.pro
+++ b/src/proto/misc2.pro
@@ -19,7 +19,7 @@
 void check_cursor(void);
 void check_visual_pos(void);
 void adjust_cursor_col(void);
-int leftcol_changed(void);
+int set_leftcol(colnr_T leftcol);
 int copy_option_part(char_u **option, char_u *buf, int maxlen, char *sep_chars);
 int vim_isspace(int x);
 int simplify_key(int key, int *modifiers);
diff --git a/src/version.c b/src/version.c
index fdcd5ba..fc4df48 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    901,
+/**/
     900,
 /**/
     899,
