Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Next" doesn't work while "run" for the same regex does #8

Closed
chrisgrieser opened this issue Oct 24, 2021 · 4 comments
Closed

"Next" doesn't work while "run" for the same regex does #8

chrisgrieser opened this issue Oct 24, 2021 · 4 comments

Comments

@chrisgrieser
Copy link

So I have this saved query to find me all heading
Screenshot 2021-10-24 18 55 06

When I Advanced cursors: run it works properly and selects all headings in the file. However, using Advanced cursors: next for the very same saved query, it does find anything
Screenshot 2021-10-24 18 54 57

@SkepticMystic
Copy link
Owner

Indeed... I have looked around a little, but couldn't immediately figure out the issue. I will keep trying when I am able

@SkepticMystic
Copy link
Owner

One solution, I think, is to swap start of line ^ with new line \n. This will catch all headings except one at the top of a note

@SkepticMystic
Copy link
Owner

But I'll obvs try solve the underlying issue :)

@SkepticMystic
Copy link
Owner

SkepticMystic commented Oct 24, 2021

Edit: Adding the m flag to a regex query should allow this to work

> I see the issue. I run the regex against the entire content of the note. So there is only one start of line ^, the start of the entire note.
> I previously had it set up to run the regex against each line, which would allow the behaviour you're looking for, but then that introduces the limitation of not being able to check for new lines \n.
> And I think multi-line queries are more useful than start-of-line queries. So I think it will stay that way unless I find a middle-ground. The solution for now then, is to swap ^\n, knowing that the first line won't match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants