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

Feature request: lineNumber in a mode stream #1340

Closed
aslushnikov opened this issue Mar 11, 2013 · 2 comments
Closed

Feature request: lineNumber in a mode stream #1340

aslushnikov opened this issue Mar 11, 2013 · 2 comments

Comments

@aslushnikov
Copy link
Contributor

It would be great to have a lineNumber for a mode stream object (aka "StringStream").

I'm trying to implement a feature to highlight all occurrences of selected word except the one being selected via addOverlay method, and I definitely lack the line number on the stream object.

Thanks!

@marijnh
Copy link
Member

marijnh commented Mar 11, 2013

This is not going to happen, since is extremely problematic: highlighting information produced for line when it was line 10 may be reused when someone presses enter a few times above it, making it line 12. Also, the more we tie modes to their context, the harder they will be to reuse (in multiplexing modes or things like runMode).

In your use case, one solution would be to put a marker on the current match which cancels the styling done by the overlay (using css precedence or !important).

@marijnh marijnh closed this as completed Mar 11, 2013
@aslushnikov
Copy link
Contributor Author

Thank you for the workaround!

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