Skip to content
  • Marwan Tanager's avatar
    More Vim-like search behavior · cc3b9aea
    Marwan Tanager authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
    
    
    This patch activates the last aborted search when pressing the search shortcuts
    ('n' or 'N').
    
    To avoid confusion, and to make things more predictable, I've chosen to always
    reactivate an aborted search starting from the beginning (or end, in case of
    'N' or '?') of the current page, as opposed to Vim which continues from the
    next search term each time the search is reactivated.
    
    Searching using '/' or '?' doesn't center the view at the current search term
    like when using 'n' or 'N', so we fix this here.
    
    Also, I managed to work around the issue of the thin rectangular margins that
    show around the previously-highlighted search terms after the search is aborted
    (either explicitly or as a result of following links), by redrawing the page
    widget (only if it's visible) instead of redrawing the rectangles covering the
    highlighted search terms.
    
    Signed-off-by: default avatarSebastian Ramacher <sebastian+dev@ramacher.at>
    cc3b9aea