fxbois / web-mode

web template editing mode for emacs
https://web-mode.org
GNU General Public License v3.0
1.63k stars 262 forks source link

Respect font-lock-dont-widen during region extension #1222

Closed vspinu closed 2 years ago

vspinu commented 2 years ago

I have a number of reports in polymode where web-mode breaks when used as inner mode (ex polymode/polymode#308, polymode/polymode#270).

I have tracked it down to web-mode scanning on a region wider than the current narrowing. It turned out current scanning machinery does not respect font-lock-dont-widen, hence the fix.

It looks to me that web-mode-scan itself should check for narrowing before running the scans on a wider region but I haven't touched that part because I am not familiar with the code base.

fxbois commented 2 years ago

Thank you