mirror of
https://codeberg.org/emersion/gamja
synced 2025-03-13 07:48:37 +01:00
Auto-complete channel names
Closes: https://todo.sr.ht/~emersion/gamja/84
This commit is contained in:
parent
aa9ce73d5a
commit
dd67e0789e
@ -1068,6 +1068,17 @@ export default class App extends Component {
|
||||
return repl.map(cmd => "/" + cmd);
|
||||
}
|
||||
|
||||
// TODO: consider using the CHANTYPES ISUPPORT token here
|
||||
if (prefix.startsWith("#")) {
|
||||
let chanNames = [];
|
||||
for (const buf of this.state.buffers.values()) {
|
||||
if (buf.name.startsWith("#")) {
|
||||
chanNames.push(buf.name);
|
||||
}
|
||||
}
|
||||
return fromList(chanNames, prefix);
|
||||
}
|
||||
|
||||
let buf = this.state.buffers.get(this.state.activeBuffer);
|
||||
if (!buf || !buf.members) {
|
||||
return [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user