feat(lua): allow :=expr as a shorter version of :lua =expr

existing behavior of
  :=
and
  :[range]=

are unchanged. `|` is still allowed with this usage.

However,
   :=p
and similar are changed in a way which could be construed as a breaking
change. Allowing |ex-flags| for := in the first place was a mistake as
any form of := DOES NOT MOVE THE CURSOR. So it would print one line number
and then print a completely different line contents after that.
This commit is contained in:
bfredl
2023-03-20 21:11:10 +01:00
parent 4cba53e09e
commit a92b38934a
10 changed files with 41 additions and 19 deletions

View File

@@ -3319,7 +3319,7 @@ module.cmds = {
{
command='=',
enum='CMD_equal',
flags=bit.bor(RANGE, TRLBAR, DFLALL, FLAGS, CMDWIN, LOCK_OK),
flags=bit.bor(RANGE, EXTRA, DFLALL, ARGOPT, CMDWIN, LOCK_OK),
addr_type='ADDR_LINES',
func='ex_equal',
},