From: Umar Getagazov <umar@handlerug.me>
If the buffer that's being closed is not the active one, there's no
point in switching the user away to another buffer.
---
components/app.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/components/app.js b/components/app.js
index 3c1f2a6..5de8b76 100644
--- a/components/app.js
+++ b/components/app.js
@@ -1298,7 +1298,9 @@ export default class App extends Component {
}
// fallthrough
case BufferType.NICK:
- this.switchBuffer({ name: SERVER_BUFFER });
+ if (this.state.activeBuffer === buf.id) {
+ this.switchBuffer({ name: SERVER_BUFFER });
+ }
this.setState((state) => {
let buffers = new Map(state.buffers);
buffers.delete(buf.id);
--
2.34.2