fix cursor file logic

pull/139/head
Aevann 2023-03-11 13:16:17 +02:00
parent 739efee3fe
commit 6ed2a36620
1 changed files with 1 additions and 5 deletions

View File

@ -468,16 +468,12 @@ function handle_files(input, newfiles) {
if (!span.textContent) span.textContent = ' '
if (ta.value && !ta.value.endsWith('\n')) {
ta.value += '\n'
}
for (const file of newfiles) {
oldfiles[ta.id].push(file)
if (span.innerHTML != ' ') span.innerHTML += ', '
span.innerHTML += file.name.substr(0, 30);
if (location.pathname != '/chat')
ta.setRangeText(`[${file.name}]\n`);
ta.setRangeText(`\n[${file.name}]`);
}
autoExpand(ta)