mirror of
https://github.com/hexedtech/codemp-vscode.git
synced 2024-11-22 07:24:49 +01:00
This commit is contained in:
parent
5b9ab79350
commit
cf2bdc347a
2 changed files with 4 additions and 4 deletions
|
@ -107,7 +107,7 @@ export async function attach_to_remote_buffer(buffer_name: string, set_content?:
|
||||||
if (set_content) {
|
if (set_content) {
|
||||||
// make remote document match local content
|
// make remote document match local content
|
||||||
let doc_len = remoteContent.length;
|
let doc_len = remoteContent.length;
|
||||||
await buffer.send({ startIdx: 0, endIdx: doc_len, content: localContent });
|
buffer.send({ startIdx: 0, endIdx: doc_len, content: localContent });
|
||||||
} else {
|
} else {
|
||||||
// make local document match remote content
|
// make local document match remote content
|
||||||
let doc_len = localContent.length;
|
let doc_len = localContent.length;
|
||||||
|
@ -130,7 +130,7 @@ export async function attach_to_remote_buffer(buffer_name: string, set_content?:
|
||||||
for (let change of event.contentChanges) {
|
for (let change of event.contentChanges) {
|
||||||
if (skip_this !== undefined && change.text == skip_this) continue;
|
if (skip_this !== undefined && change.text == skip_this) continue;
|
||||||
// LOGGER.info(`onDidChangeTextDocument(event: [${change.rangeOffset}, ${change.text}, ${change.rangeOffset + change.rangeLength}])`);
|
// LOGGER.info(`onDidChangeTextDocument(event: [${change.rangeOffset}, ${change.text}, ${change.rangeOffset + change.rangeLength}])`);
|
||||||
await buffer.send({
|
buffer.send({
|
||||||
startIdx: change.rangeOffset,
|
startIdx: change.rangeOffset,
|
||||||
endIdx: change.rangeOffset + change.rangeLength,
|
endIdx: change.rangeOffset + change.rangeLength,
|
||||||
content: change.text
|
content: change.text
|
||||||
|
|
|
@ -96,7 +96,7 @@ export async function join(selected: vscode.TreeItem | undefined) {
|
||||||
let buffer = mapping.bufferMapper.by_editor(buf);
|
let buffer = mapping.bufferMapper.by_editor(buf);
|
||||||
if (buffer === undefined) {
|
if (buffer === undefined) {
|
||||||
if (once) {
|
if (once) {
|
||||||
await controller.send({
|
controller.send({
|
||||||
startRow: 0,
|
startRow: 0,
|
||||||
startCol: 0,
|
startCol: 0,
|
||||||
endRow: 0,
|
endRow: 0,
|
||||||
|
@ -107,7 +107,7 @@ export async function join(selected: vscode.TreeItem | undefined) {
|
||||||
once = false;
|
once = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
await controller.send({
|
controller.send({
|
||||||
startRow: selection.anchor.line,
|
startRow: selection.anchor.line,
|
||||||
startCol: selection.anchor.character,
|
startCol: selection.anchor.character,
|
||||||
endRow: selection.active.line,
|
endRow: selection.active.line,
|
||||||
|
|
Loading…
Reference in a new issue