File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -584,8 +584,15 @@ def set_search_text(self, text):
584584 if  not  self .isearch_state :
585585 self .start_isearch ()
586586
587-  # When `text` is not a suffix of the search string that we had. 
588-  if  not  text .startswith (self .isearch_state .isearch_text ):
587+  # When backspace has been pressed. 
588+  if  self .isearch_state .no_match_from_index  and  \
589+  self .isearch_state .isearch_text .startswith (text ):
590+  if  len (text ) <  self .isearch_state .no_match_from_index :
591+  self .isearch_state .no_match_from_index  =  None 
592+ 
593+  # When not appending text. 
594+  # (When `text` is not a suffix of the search string that we had.) 
595+  elif  not  text .startswith (self .isearch_state .isearch_text ):
589596 self .isearch_state .no_match_from_index  =  None 
590597
591598 self .working_index  =  self .isearch_state .original_working_index 
                         You can’t perform that action at this time. 
           
                  
0 commit comments