-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Console issues #66
Comments
How do you close the PSIC window? With
Do you have a link to the issue? Maybe I can help - this really should be a thing in |
Yeah, I close it with q. But I do it just to get more space for my script, so if I run script or selection I definitely need get that console back. I realized that showTerminalIfVisible function is just used to move cursor to the PSIC buffer (when running F5/F8). I think we actually should do the opposite (same way as VSCode) - show it if it's hidden, that would make this function much more meaningful (it still can manage cursor location). public async showTerminalIfVisible() {
if (this.consoleTerminal) {
const winid: number = await vscode.workspace.nvim.eval(`bufwinid(${this.consoleTerminal.bufnr})`) as number;
// If winid is -1, it means the window is not visible/is hidden.
if (winid == -1) {this.consoleTerminal.show()}
this.consoleTerminal.show(!this.config.integratedConsole.focusConsoleOnExecute);
// mike1984 - always show if hidden and do the cursor trick based on settings
}
} Also, if we add extra else statement to that function it would actually do the toggling
I guess we can add it in this form until (and if) it's implemented on cocnvim's end |
Also, I'm still looking forward to use dot sourcing (vs &) for execute command, so it works the same way as ISE. I guess we can create extra configuration to keep both options |
@mikeTWC1984 well unfortunately coc.nvim has asked us to implement the toggle ourselves. Since you seem to have an understanding of what needs to be done, do you wanna submit a PR?
It really dot sources it? That seems like it could cause some problems with scoping that could confuse the user? I'm fine adding it in with a configuration but I am inclined to say that |
@TylerLeonhardt OK, I submitted PR, although it didn't pass autocheck (it wants some syntax improvements), I'll keep it as is for now. |
This setting was added in #94. Closing this. |
This configuration doesn't seem to work:
"powershell.integratedConsole.focusConsoleOnExecute":true
If I close PSIC window and execute evaluateSelection or Execute commands PSIC window will not come back.
Other thing. I was browsing extensions.js file, I see that consoleTerminal has show and hide methods. Is it possible to map those as coc commands? (assuming these methods showing/hiding that terminal window indeed). This would let us to implement proper toggling feature (I opened a ticket with cocnvim but it probably will take a while/forever)
The text was updated successfully, but these errors were encountered: