Skip to content

You can not search backwards with the API #245

@FichteFoll

Description

@FichteFoll

The Find panel defines a "Find Prev" Button, but this is not reflected in the API.
view.find(pattern, fromPosition, <flags>) does not provide a way to search backwards.

The only way to implement this now is by either substracting arbitrary numbers from fromPosition and trying as long as 0 is reached or a match before the initial fromPosition is found, or using view.find_all(pattern, <flags>, <format>, <extractions>) and then searching for the last find before fromPosition.

Initially brought up at http://www.sublimetext.com/forum/viewtopic.php?f=6&t=15300&p=57797#p57797.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions