Skip to content

Previous search (Ctrl+p) matches left to right instead of right to left #1226

@Maickii

Description

@Maickii

say I have the following in a text file, and the pipe | represents where my cursor is located
hello hello hello
hello hello hello
| hello hello hello

When I do Ctrl+f and type in hello it finds the next instance starting from my cursor, which is fine. Anytime I press Ctrl+n it goes to the next instance of hello, which is on the same line, which is also fine. Now the bug is when using Ctrl+p. Ctrl+p will search backward (previous lines), match the first instance reading from left to right instead of right to left. So say I represent the matched text with [hello] and square braces and still have the same file.

hello hello hello
hello hello hello
| hello hello hello

Ctrl+f # type in hello
Ctrl+p

#the expected result would be this
hello hello hello
hello hello [hello]
hello hello hello

#not this
hello hello hello
[hello] hello hello
hello hello hello

Version: 1.4.1
Commit hash: 1856891
Compiled on August 10, 2018

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