neotest icon indicating copy to clipboard operation
neotest copied to clipboard

Weird cursor position in output buf when test result is short

Open scottming opened this issue 2 years ago • 2 comments

This is my test output

image

This is the test output buf:

image

My expectation is that the cursor can move to the first line, and also, the height and width of float do not need to be so big.

I have checked this function: https://github.com/nvim-neotest/neotest/blob/master/lua/neotest/consumers/output.lua#L41, but I don't know the specific reason, my lines variable is: { "Test passed in 0.00ms"}

image

scottming avatar Jun 24 '23 09:06 scottming

ok, if my lines is { "Test passed in 0.00ms", ""}, I can fix the cursor position error, but the buffer size issue still exists.

scottming avatar Jun 24 '23 09:06 scottming

Furthermore, I think the windows displayed by these two commands are very different. I suggest keeping them consistent.

<cmd>lua require('neotest').run.run()<cr>

image

<cmd>lua require("neotest").output.open({ enter = true })<cr>

image

scottming avatar Jun 24 '23 09:06 scottming