Skip to content

n / N commands should honor search direction #260

@fdela

Description

@fdela

Describe the bug
After you search for a string using '/' or '?', subsequent n / N do not honor search direction, i.e. n always searches top-to-bottom and N bottom-to-top.
This works differently from vi where n (N) searches for the next (previous) occurence based on the search direction.

To Reproduce
Search reverse for a string using ? string1
Type n to search for next occurence -> is one lower on the screen

Search reverse for a string using ? string2
Type N to search for previous occurence -> is one higher on the screen

Expected behavior
Next string1 occurence should be higher on the screen
Previous string2 occurence should be one lower on the screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions