mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-10-03 05:59:43 +02:00
fix(terminal): remove the unreachable copyTerminal(), closing out #322
The last two items of #322: copyTerminal() copied the entire buffer but was wired to no button, shortcut or call site anywhere, and it wrote through navigator.clipboard directly, which is undefined on the plain-HTTP LAN install, so it would have failed there even if it were reachable. Everything that actually copies goes through copyTerminalSelection() and _copyText's execCommand fallback; whole- buffer copy, should anyone want it, is a selectAll() away from that same working path. Closes #322 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3878,21 +3878,6 @@ Object.assign(CodemanApp.prototype, {
|
||||
return ok;
|
||||
},
|
||||
|
||||
async copyTerminal() {
|
||||
try {
|
||||
const buffer = this.terminal.buffer.active;
|
||||
let text = '';
|
||||
for (let i = 0; i < buffer.length; i++) {
|
||||
const line = buffer.getLine(i);
|
||||
if (line) text += line.translateToString(true) + '\n';
|
||||
}
|
||||
await navigator.clipboard.writeText(text.replace(/\n+$/, '\n'));
|
||||
this.showToast('Copied to clipboard', 'success');
|
||||
} catch (err) {
|
||||
this.showToast('Failed to copy', 'error');
|
||||
}
|
||||
},
|
||||
|
||||
_syncMobileHelperTextareaToCursor() {
|
||||
if (!MobileDetection.isTouchDevice() || !this.terminal?.element) return;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user