Vscode-restclient: Preserve focus of the http editor

Created on 17 Feb 2018  路  9Comments  路  Source: Huachao/vscode-restclient

Pretty please preserve focus of the http/rest editor. Whenever I open a new file it opens at the right side, that is annoying.

https://code.visualstudio.com/docs/extensionAPI/vscode-api#showTextDocument

showTextDocument(document: TextDocument, column?: ViewColumn, preserveFocus?: boolean): Thenable

Set preserveFocus to true.

question upstream

All 9 comments

@lostfields do you want to keep the request editor focus after the response view is shown. The reason for switching to the response view is that normally users want to inspect the response directly, scroll the response page up and down. Maybe I can provide a setting to control this, do you think it's OK for you?

yes, that would be nice - and then it's probably possible to override in workspace-settings as well?

@lostfields yes, either user setting or workspace setting is ok

@lostfields since response preview is in fact a webview page, and vscode doesn't allow the preserveFocus option currently.

@lostfields VSCode will support this option in webview in May Release, so I will complete this as soon as it is released.

@lostfields @jon301 @arturock I have added a setting named previewResponsePanelTakeFocus, by default its value is true. So you can set it to false to preserve http editor focus.

Great news @Huachao! Thank you so much!

@lostfields @jon301 @arturock now you can use the new setting rest-client.previewResponsePanelTakeFocus to preserve focus of the http editor, by default it will be true, you can set it to false to achieve it.

Working perfectly! Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ryan-ju picture ryan-ju  路  17Comments

akalcik picture akalcik  路  15Comments

SimonDever picture SimonDever  路  15Comments

codepunkt picture codepunkt  路  29Comments

ben-foster-cko picture ben-foster-cko  路  19Comments