opened
nimitbhardwaj
username_0
When entering a large string in substitute command when `set inccommand=nosplit` is enabled, the string wraps around the single line. This was due to the condition that in Preview mode, we need a kind of behaviour where the DOCMD_NOWAIT is not completely necessary because there is change in the size of the cmdlilne, but we don't need to wait for the return, so ++no_wait_return was not necessary.
[RFC] Fix for wrapping of large string in preview mode
issue
created
nimitbhardwaj
username_0
What about the tests of this PR
comment
created
bfredl
username_1
As this is a visual glitch it should use a screen test. Follow the pattern of the exiting screen tests in `ui/inccommand_spec.lua`.
comment
created
nimitbhardwaj
username_0
Ok
comment
created
justinmk
username_2
The AppVeyor failure looks related to this change.

```
[  ERROR   ] C:/projects/neovim/test/functional\ui\inccommand_spec.lua @ 135: :substitute, 'inccommand' preserves listed buffers (:ls)
test\functional\ui\screen.lua:307: Row 1 did not match.
Expected:
  |*{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |:ls                           |
  |  1 %a + "[No Name]"          |
  |          line 1              |
  |{13:Press ENTER or type command to}|
  |{13: continue}^                     |
Actual:
  |*^BAC                           |
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |{15:~                             }|
  |                              |
To print the expect() call that would assert the current screen state, use
```

Maybe the test just needs to be adjusted. Need to look at the test, understand what it's doing, and decide if the change from this PR caused a bug, or if the test just needs to be a adjusted.
comment
created
justinmk
username_2
The quickbuild BSD failure looks related:

```
05:06:52,403 INFO  - not ok 2743 - :substitute, inccommand=split shows correct line numbers with many lines
05:06:52,403 INFO  - # test/functional/ui/inccommand_spec.lua @ 1023
05:06:52,403 INFO  - # Failure message: ./test/functional/ui/screen.lua:307: Row 1 did not match.
05:06:52,403 INFO  - # Expected:
05:06:52,403 INFO  - #   |*BBo lines                     |
05:06:52,403 INFO  - #   |Inc substitution on           |
05:06:52,403 INFO  - #   |{12:X}o lines                      |
05:06:52,403 INFO  - #   |Inc substitution on           |
05:06:52,403 INFO  - #   |{12:X}o lines                      |
05:06:52,403 INFO  - #   |{11:[No Name] [+]                 }|
05:06:52,403 INFO  - #   ||1001| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1003| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1005| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1007| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1009| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1011| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1013| {12:X}o lines               |
05:06:52,403 INFO  - #   |{10:[Preview]                     }|
05:06:52,403 INFO  - #   |:%s/tw/X^                      |
05:06:52,403 INFO  - # Actual:
05:06:52,403 INFO  - #   |*Inc substitution on           |
05:06:52,403 INFO  - #   |BBo lines                     |
05:06:52,403 INFO  - #   |Inc substitution on           |
05:06:52,403 INFO  - #   |{12:X}o lines                      |
05:06:52,403 INFO  - #   |Inc substitution on           |
05:06:52,403 INFO  - #   |{11:[No Name] [+]                 }|
05:06:52,403 INFO  - #   ||1001| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1003| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1005| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1007| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1009| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1011| {12:X}o lines               |
05:06:52,403 INFO  - #   ||1013| {12:X}o lines               |
05:06:52,403 INFO  - #   |{10:[Preview]                     }|
05:06:52,403 INFO  - #   |:%s/tw/X^                      |
05:06:52,403 INFO  - #-
```
comment
created
nimitbhardwaj
username_0
I correct em
comment
created
nimitbhardwaj
username_0
By the way why this error occurs, I didn't changed the code of that part, I even didn't touch the code for that `describe` i.e. of  `substitute, inccommand=split` I put my test in describe of `inccommand=nosplit`
comment
created
nimitbhardwaj
username_0
Perhaps I should make the commit again and test if that error persists, and if persists, I will try by removing the test.
comment
created
nimitbhardwaj
username_0
Lets have a try on this
comment
created
nimitbhardwaj
username_0
Yes error occurs, this may be due to my change in src, I try what can I do, I am sure, that error didn't occur previously, some changes occur after my work
comment