Skip to content

Commit

Permalink
fix(input): delete buffer on vim only
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Aug 31, 2023
1 parent 02c2542 commit fc260ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/model/input.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict'
import { Neovim } from '@chemzqm/neovim'
import { Disposable, Emitter, Event } from '../util/protocol'
import events from '../events'
import { disposeAll } from '../util'
import { omitUndefined } from '../util/object'
import { Disposable, Emitter, Event } from '../util/protocol'
import { toText } from '../util/string'

export interface InputPreference {
Expand Down Expand Up @@ -160,7 +160,7 @@ export default class InputBox implements Disposable {
if (this._disposed) return
this._disposed = true
this.nvim.call('coc#float#close', [this._winid ?? -1], true)
this.nvim.command(`silent! bd! ${this._bufnr}`, true)
if (this.nvim.isVim) this.nvim.command(`silent! bd! ${this._bufnr}`, true)
this._onDidFinish.fire(this.accepted ? this._input : null)
this._winid = undefined
this._bufnr = undefined
Expand Down

0 comments on commit fc260ab

Please sign in to comment.