mirror of
https://github.com/esm7/obsidian-vimrc-support.git
synced 2026-07-22 05:00:25 +00:00
Fixed a race condition in yank & paste
This commit is contained in:
parent
5819c69532
commit
760953695e
4 changed files with 7 additions and 3 deletions
|
|
@ -67,6 +67,10 @@ Things I'd love to add:
|
|||
|
||||
## Changelog
|
||||
|
||||
### 0.2.4
|
||||
|
||||
Fixed a race condition with yank & paste: https://github.com/esm7/obsidian-vimrc-support/issues/11
|
||||
|
||||
### 0.2.3
|
||||
|
||||
Added the `noremap` command, thanks @nadavspi!
|
||||
|
|
|
|||
2
main.ts
2
main.ts
|
|
@ -93,7 +93,7 @@ export default class VimrcPlugin extends Plugin {
|
|||
if (currentBuffer != this.lastYankBuffer) {
|
||||
if (this.lastYankBuffer.length > 0 && currentBuffer.length > 0 && currentBuffer[0]) {
|
||||
navigator.clipboard.writeText(currentBuffer[0]);
|
||||
this.lastSystemClipboard = currentBuffer[0];
|
||||
navigator.clipboard.readText().then((value) => { this.lastSystemClipboard = value; });
|
||||
}
|
||||
this.lastYankBuffer = currentBuffer;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "obsidian-vimrc-support",
|
||||
"name": "Obsidian Vimrc Support",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"description": "Auto-load a startup file with Obsidian Vim commands.",
|
||||
"author": "esm",
|
||||
"authorUrl": "",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "obsidian-vimrc-support",
|
||||
"version": "0.2.3",
|
||||
"version": "0.2.4",
|
||||
"description": "Auto-load a startup file with Obsidian Vim commands.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue