Skip to content

Conversation

@rsekman
Copy link
Contributor

@rsekman rsekman commented Feb 22, 2021

The ac and ic text objects did not match the math mode spacing commands \, \: \; \!.

Fixed by modifying the defining regexp. Also includes a test.

ac/ic objects do not work with the spacing commands \;, \,! etc
ic/ac objects now work for the commands \, \:, \; and \!
let [l:lnum, l:cnum] = searchpos('\v\\\a+\*?', a:next ? 'nW' : 'cbnW')
let l:match = matchstr(getline(l:lnum), '^\v\\\a*\*?', l:cnum-1)
let [l:lnum, l:cnum] = searchpos('\v\\(\a+\*?|[,:;!])', a:next ? 'nW' : 'cbnW')
let l:match = matchstr(getline(l:lnum), '^\v\\([,:;!]|\a*\*?)', l:cnum-1)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good. Could you use %(...) (see :help %().

@lervag
Copy link
Owner

lervag commented Feb 22, 2021

I had a minor comment, except for that this looks good. Thanks!

@rsekman
Copy link
Contributor Author

rsekman commented Feb 22, 2021

Like this then, yeah?

@lervag lervag merged commit 607e94e into lervag:master Feb 22, 2021
@lervag
Copy link
Owner

lervag commented Feb 22, 2021

Yes, precisely. Thanks!

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

Successfully merging this pull request may close these issues.

2 participants