Vim icon indicating copy to clipboard operation
Vim copied to clipboard

:split cannnot open files correctly

Open unlsycn opened this issue 2 years ago • 1 comments

Describe the bug The :split (also :vsplit, :vsp) command can split the active editor in the right way, but it does not open the specified file. When I attempted to debug it, I found it seems to be able to get the correct file path and vscode.window.showTextDocument(doc); not to work.

Expected behavior The file would be opened in the splitted editor.

Screenshots image image

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 2022/6/29 version
  • VSCode version: 1.70.0-insider
  • OS: Windows_NT x64 10.0.22000

unlsycn avatar Jul 13 '22 07:07 unlsycn

Here is what is returned when I execute vscode.window.showTextDocument(doc) manually in Debug Console. The PromiseState is 'pending' and I wonder if it connotes that the function is not executed.

Promise {
  Symbol(async_id_symbol): 6732
  Symbol(destroyed): {
    destroyed: false
  }
  Symbol(trigger_async_id_symbol): 6725
  [[PromiseResult]]: undefined
  [[PromiseState]]: 'pending'
  [[Prototype]]: Promise
}

unlsycn avatar Jul 29 '22 13:07 unlsycn

The same issue happens to me.

HSID avatar Oct 19 '22 12:10 HSID

The same issue happens to me.

#7877 It works for me.

unlsycn avatar Oct 20 '22 11:10 unlsycn

Hi @unlsycn , why is your pull request still open? It seems like the right way to use the split and vsplit. I have the same problem now, what do you suggest?

LeoLau94 avatar Nov 13 '22 09:11 LeoLau94

Hi @unlsycn , why is your pull request still open? It seems like the right way to use the split and vsplit. I have the same problem now, what do you suggest?

Perhaps this issue cannot be reproduced in the maintainer's machine. Compiling my fork to .vsix and installing it locally may be a temporary measure as I have done.

unlsycn avatar Nov 15 '22 11:11 unlsycn

just commenting doesn't work on my windows 10 machine either

OS Name	Microsoft Windows 10 Pro
Version	10.0.19045 Build 19045
vscodevim version: v1.24.3

sworleys avatar Feb 17 '23 01:02 sworleys

Seeing the same thing on VSCodeVim v1.24.3 on the latest VS Code Insider build (1.76.0). I can see that the correct file gets opened for a split second so it seems like it gets found correctly, however, the tab immediately reverts to the previous file open and shows the "File: does not exist." error popup in the lower right corner, resulting in the duplicate file open in the new pane like the OP's screenshot

From the Extension Host output, I see the following message every time :vsp or :sp is used:

2023-02-21 15:24:28.666 [warning] TextEditor is closed/disposed
2023-02-21 15:24:28.666 [warning] TextEditor is closed/disposed

gyroknight avatar Feb 21 '23 23:02 gyroknight

I'm hitting this too.

bmw avatar Apr 12 '23 21:04 bmw

Same thing here.

macOS VSCode Version: 1.80.2 Commit: 2ccd690cbff1569e4a83d7c43d45101f817401dc Vim Version: v1.25.2

theuema avatar Aug 03 '23 07:08 theuema

Can someone please confirm whether this is fixed in 1.26.0?

J-Fields avatar Sep 10 '23 00:09 J-Fields

Can someone please confirm whether this is fixed in 1.26.0?

I tried just a few days ago and the bug was still present. Now with the the release of 1.26.0, I'm glad to report the issue has indeed been resolved. #8535 seems to have done the trick.

xty avatar Sep 10 '23 17:09 xty