Issue by redmunds
Thursday Mar 13, 2014 at 19:51 GMT
Originally opened as adobe/brackets#7193
I discovered this when implementing editor preference validation. For EditorStatusBar to display the cursor position, it calls Editor.getCursorPos() with expandTabs option. This causes the "tabSize" preference to be retrieved on every keystroke. This really sucks in a document that doesn't have any Tab characters!
This changes it so the "tabSize" pref is not retrieved until a until a Tab char is found.
This value could be cached to improve it for docs with Tab chars since it rarely changes.
redmunds included the following code: https://github.com/adobe/brackets/pull/7193/commits
Thursday Mar 13, 2014 at 19:51 GMT
Originally opened as adobe/brackets#7193
I discovered this when implementing editor preference validation. For
EditorStatusBarto display the cursor position, it callsEditor.getCursorPos()withexpandTabsoption. This causes the "tabSize" preference to be retrieved on every keystroke. This really sucks in a document that doesn't have any Tab characters!This changes it so the "tabSize" pref is not retrieved until a until a Tab char is found.
This value could be cached to improve it for docs with Tab chars since it rarely changes.
redmunds included the following code: https://github.com/adobe/brackets/pull/7193/commits