Vim
Vim copied to clipboard
Fix `set tw=N`
- Fixes
set tw=Ncommand - Add test for
set tw=N
What this PR does / why we need it:
Since the v1.23.0 release, setting 'textwidth' on the fly with set tw=100 has
been broken and would cause the following error:
CommandLine: Error executing cmd=set textwidth=100.
err=TypeError: Cannot set property textwidth of #<f> which has only a getter.
This PR provides a fix and also adds a test so we can tell if the command breaks again.
Which issue(s) this PR fixes Fixes #7809
(Sorry, didn't mean to close this PR temporarily.)
I've come up with something for set textwidth(number) but I'm not sure it is the right approach so very open to alternative suggestions! This PR is now more of an RFC.
It'd be nice if this worked! Can this be rebased and landed?
@J-Fields Would you be willing to take a look at this one? Having this will be a pretty big impact on usability. Thanks!