fix cursor file logic
parent
739efee3fe
commit
6ed2a36620
|
@ -468,16 +468,12 @@ function handle_files(input, newfiles) {
|
||||||
|
|
||||||
if (!span.textContent) span.textContent = ' '
|
if (!span.textContent) span.textContent = ' '
|
||||||
|
|
||||||
if (ta.value && !ta.value.endsWith('\n')) {
|
|
||||||
ta.value += '\n'
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const file of newfiles) {
|
for (const file of newfiles) {
|
||||||
oldfiles[ta.id].push(file)
|
oldfiles[ta.id].push(file)
|
||||||
if (span.innerHTML != ' ') span.innerHTML += ', '
|
if (span.innerHTML != ' ') span.innerHTML += ', '
|
||||||
span.innerHTML += file.name.substr(0, 30);
|
span.innerHTML += file.name.substr(0, 30);
|
||||||
if (location.pathname != '/chat')
|
if (location.pathname != '/chat')
|
||||||
ta.setRangeText(`[${file.name}]\n`);
|
ta.setRangeText(`\n[${file.name}]`);
|
||||||
}
|
}
|
||||||
|
|
||||||
autoExpand(ta)
|
autoExpand(ta)
|
||||||
|
|
Loading…
Reference in New Issue