webextensions / live-css-editor

Source code for Chrome/Edge/Firefox/Opera extension Magic CSS (Live editor for CSS, Less & Sass)
https://chromewebstore.google.com/detail/live-editor-for-css-less/ifhikkcafabcgolfjegfcgloomalapol
MIT License
277 stars 58 forks source link

Search dosnt appear to correctly work #142

Closed molster closed 3 months ago

molster commented 4 months ago

I didnt see anything in the documentation for this, so was jsut using CTRL F (both in browser, and when popped out as its own window)

However CTRL F only searches for content that is in the view. If i have about 900+ lines, you basically cant search any of the css.

webextensions commented 4 months ago

@molster Thank you for your report.

We use the CodeMirror library for rendering the code editor functionality. By default, for performance reasons, it does lazy rendering which is controlled by a parameter called viewportMargin (https://codemirror.net/5/doc/manual.html#option_viewportMargin).

The default value for viewportMargin is 10. If we set it to a very high number (or Infinity), then that would solve the search issue for high number of lines of code.

We will attempt the change in the following ways:

webextensions commented 4 months ago

We hope that the root cause should be fixed for most of the use-cases as per the above mentioned Phase 1 changes.

Keeping the issue open for the updates to be done for Phase 2.

molster commented 4 months ago

Thank you! This will be such a time saver.

webextensions commented 3 months ago

Added a TODO note for the remaining part (https://github.com/webextensions/live-css-editor/commit/f2d3df6709ec8bd6662bbb58a6bc89a4c4377975) and closing this issue.