[BUG]: Double pasting in regular files with unitade enabled
Contact details
No response
What the essence of the bug
I am unsure how to replicate this bug. My apologies.
Grouped extensions set to the following:
markdown: data> logs> csv> txt; codeview: conf>> config> reg> py> json> yaml> yml> env> js> css>;
With the "force vanilla paste" addition, it seems to have introduced an odd case of double pasting in the regular editor (not code view). This occurs regardless of what force vanilla paste is set to. After a period of time with the extension enabled, the paste command will occur multiple times when attempting to paste using ctrl + v (not ctrl + shift v). This only happens in the regular editor, not code view.
I have a decently large amount of plugins enabled, so perhaps this may be due to a conflict between this extension and another? Complete shot in the dark. After a while of using it normally with my regular set of plugins, even disabling other extensions will not resolve the paste issue. The only way to have the bug "reset" is to disable and enable unitade. This works for a while.
Version of an project's essence
3.2.2
On what OS you have encountered the bug.
Windows
Code of conduct
- [x] I agree to follow this project's code of conduct
Issue policy
- [x] I agree to follow this project's issue policy
Can you please send list of the plugins when error occurs?
[!Note] You can do this by opening vault's settings and: "→ Options → General → Advanced → Notify if startup takes longer than expected → (timer icon)", with "copy to clipboard" to copy entire setup information.
Yeah, for some reason I can not copy and paste into a .txt file. I can edit the .txt file tho.
Yeah, for some reason I can not copy and paste into a .txt file. I can edit the .txt file tho.
Have you enabled the "force vanilla paste" setting? Have you tried Ctrl+Shift+V? If so, please send your setup info and application logs.
[!Note] You can do this by opening vault's settings and: "→ Options → General → Advanced → Notify if startup takes longer than expected → (timer icon)", with "copy to clipboard" to copy entire setup information.
About collecting debug information: https://help.obsidian.md/resources#Collect+debug+information
Awesome, yes it worked after enabling the "force vanilla paste"! Thanks very much!
Awesome, yes it worked after enabling the "force vanilla paste"! Thanks very much!
Glad to help! This plugin contains a lot of features like this, if you are interested in any behavior\feature more thoroughly, recommended to read the wiki of this plugin: https://github.com/Falcion/UNITADE.md/wiki/
Can you please send list of the plugins when error occurs?
Note
You can do this by opening vault's settings and: "→ Options → General → Advanced → Notify if startup takes longer than expected → (timer icon)", with "copy to clipboard" to copy entire setup information.
Been busy, sorry. Have it doing the issue again, here is the startup time output on my laptop:
Obsidian start-up time breakdown
Obsidian version: v1.8.9
Installer version: v1.6.7
Operating system: Windows 10 Home 10.0.19045
- Total startup time: 3,259ms
- Initialization: 307ms
- Vault (440 files): 150ms
- Workspace (15 tabs, 12 deferred): 342ms
- Core plugins: 45ms
- Community plugins (20 active): 2,415ms
- UNITADE.md (v3.2.2): 595ms
- Image Converter (v1.3.10): 156ms
- File Order (v0.0.11): 138ms
- Advanced Tables (v0.22.1): 136ms
- Local images (v0.14.2): 126ms
- Latex Suite (v1.9.8): 124ms
- Text Format (v3.1.0): 114ms
- Style Settings (v1.0.9): 105ms
- Linter (v1.28.0): 104ms
- Editing Toolbar (v3.1.6): 90ms
- Callout Manager (v1.1.0): 63ms
- List Callouts (v1.2.9): 60ms
- Creases (v0.7.0): 47ms
- Recently Added Files (v1.1.1): 38ms
- Copy Inline Code (v1.2.0): 32ms
- Remember cursor position (v1.0.9): 28ms
- Callout Integrator (v1.1.4): 23ms
- Code Editor Shortcuts (v1.14.0): 23ms
- Shortcuts extender (v2.2.0): 23ms
- Copy Block Link (v1.0.4): 18ms
edit: Crap, sorry. Didn't mean to close the issue.
Tried to reproduce the bug with the same setup, no issues like this occured, tested on old installer and new installer, no errors, I have this propositions:
- you can send me your Vault (without any personal files, just
.obsidianand other system/config related files of your Vault); - if this error occurs another time, open the Developer console (
Ctrl+Shift+V) and try to check any related errors (spoilers:toUrl()error of UNITADE is not related to this); - try to test different versions of Obsidian/Obsidian's installer if applicable; maybe use "halving" method by disabling half of the plugin every time issue persist;
Testing would continue, so issue won't be closed, but more info/bug-reports would be appreciated.
Where would you like me to upload my .obsidian folder for you?
I looked in console after it started happening again and it seems like it could be related to the linter plugin modifying paste a bit. Temporarily disabled linter and it seemed to fix it. Unsure why this did not fix it before. I will attempt to disable parts of either plugin, as you said, as soon as the behavior begins again.
Here is my config in linter:
{
"ruleConfigs": {
"add-blank-line-after-yaml": {
"enabled": false
},
"dedupe-yaml-array-values": {
"enabled": false,
"dedupe-alias-key": true,
"dedupe-tag-key": true,
"dedupe-array-keys": true,
"ignore-keys": ""
},
"escape-yaml-special-characters": {
"enabled": false,
"try-to-escape-single-line-arrays": false
},
"force-yaml-escape": {
"enabled": false,
"force-yaml-escape-keys": ""
},
"format-tags-in-yaml": {
"enabled": false
},
"format-yaml-array": {
"enabled": false,
"alias-key": true,
"tag-key": true,
"default-array-style": "single-line",
"default-array-keys": true,
"force-single-line-array-style": "",
"force-multi-line-array-style": ""
},
"insert-yaml-attributes": {
"enabled": false,
"text-to-insert": "aliases: \ntags: "
},
"move-tags-to-yaml": {
"enabled": false,
"how-to-handle-existing-tags": "Nothing",
"tags-to-ignore": ""
},
"remove-yaml-keys": {
"enabled": false,
"yaml-keys-to-remove": ""
},
"sort-yaml-array-values": {
"enabled": false,
"sort-alias-key": true,
"sort-tag-key": true,
"sort-array-keys": true,
"ignore-keys": "",
"sort-order": "Ascending Alphabetical"
},
"yaml-key-sort": {
"enabled": false,
"yaml-key-priority-sort-order": "",
"priority-keys-at-start-of-yaml": true,
"yaml-sort-order-for-other-keys": "None"
},
"yaml-timestamp": {
"enabled": false,
"date-created": true,
"date-created-key": "date created",
"date-created-source-of-truth": "file system",
"date-modified": true,
"date-modified-key": "date modified",
"date-modified-source-of-truth": "file system",
"format": "dddd, MMMM Do YYYY, h:mm:ss a",
"convert-to-utc": false,
"update-on-file-contents-updated": "never"
},
"yaml-title": {
"enabled": false,
"title-key": "title",
"mode": "first-h1-or-filename-if-h1-missing"
},
"yaml-title-alias": {
"enabled": false,
"preserve-existing-alias-section-style": true,
"keep-alias-that-matches-the-filename": false,
"use-yaml-key-to-keep-track-of-old-filename-or-heading": true,
"alias-helper-key": "linter-yaml-title-alias"
},
"capitalize-headings": {
"enabled": false,
"style": "Title Case",
"ignore-case-words": true,
"ignore-words": "macOS, iOS, iPhone, iPad, JavaScript, TypeScript, AppleScript, I",
"lowercase-words": "a, an, the, aboard, about, abt., above, abreast, absent, across, after, against, along, aloft, alongside, amid, amidst, mid, midst, among, amongst, anti, apropos, around, round, as, aslant, astride, at, atop, ontop, bar, barring, before, B4, behind, below, beneath, neath, beside, besides, between, 'tween, beyond, but, by, chez, circa, c., ca., come, concerning, contra, counting, cum, despite, spite, down, during, effective, ere, except, excepting, excluding, failing, following, for, from, in, including, inside, into, less, like, minus, modulo, mod, near, nearer, nearest, next, notwithstanding, of, o', off, offshore, on, onto, opposite, out, outside, over, o'er, pace, past, pending, per, plus, post, pre, pro, qua, re, regarding, respecting, sans, save, saving, short, since, sub, than, through, thru, throughout, thruout, till, times, to, t', touching, toward, towards, under, underneath, unlike, until, unto, up, upon, versus, vs., v., via, vice, vis-à-vis, wanting, with, w/, w., c̄, within, w/i, without, 'thout, w/o, abroad, adrift, aft, afterward, afterwards, ahead, apart, ashore, aside, away, back, backward, backwards, beforehand, downhill, downstage, downstairs, downstream, downward, downwards, downwind, east, eastward, eastwards, forth, forward, forwards, heavenward, heavenwards, hence, henceforth, here, hereby, herein, hereof, hereto, herewith, home, homeward, homewards, indoors, inward, inwards, leftward, leftwards, north, northeast, northward, northwards, northwest, now, onward, onwards, outdoors, outward, outwards, overboard, overhead, overland, overseas, rightward, rightwards, seaward, seawards, skywards, skyward, south, southeast, southwards, southward, southwest, then, thence, thenceforth, there, thereby, therein, thereof, thereto, therewith, together, underfoot, underground, uphill, upstage, upstairs, upstream, upward, upwards, upwind, west, westward, westwards, when, whence, where, whereby, wherein, whereto, wherewith, although, because, considering, given, granted, if, lest, once, provided, providing, seeing, so, supposing, though, unless, whenever, whereas, wherever, while, whilst, ago, according to, as regards, counter to, instead of, owing to, pertaining to, at the behest of, at the expense of, at the hands of, at risk of, at the risk of, at variance with, by dint of, by means of, by virtue of, by way of, for the sake of, for sake of, for lack of, for want of, from want of, in accordance with, in addition to, in case of, in charge of, in compliance with, in conformity with, in contact with, in exchange for, in favor of, in front of, in lieu of, in light of, in the light of, in line with, in place of, in point of, in quest of, in relation to, in regard to, with regard to, in respect to, with respect to, in return for, in search of, in step with, in touch with, in terms of, in the name of, in view of, on account of, on behalf of, on grounds of, on the grounds of, on the part of, on top of, with a view to, with the exception of, à la, a la, as soon as, as well as, close to, due to, far from, in case, other than, prior to, pursuant to, regardless of, subsequent to, as long as, as much as, as far as, by the time, in as much as, inasmuch, in order to, in order that, even, provide that, if only, whether, whose, whoever, why, how, or not, whatever, what, both, and, or, not only, but also, either, neither, nor, just, rather, no sooner, such, that, yet, is, it"
},
"file-name-heading": {
"enabled": false
},
"header-increment": {
"enabled": true,
"start-at-h2": true
},
"headings-start-line": {
"enabled": true
},
"remove-trailing-punctuation-in-heading": {
"enabled": false,
"punctuation-to-remove": ".,;:!。,;:!"
},
"footnote-after-punctuation": {
"enabled": true
},
"move-footnotes-to-the-bottom": {
"enabled": true
},
"re-index-footnotes": {
"enabled": false
},
"auto-correct-common-misspellings": {
"enabled": false,
"ignore-words": "",
"skip-words-with-multiple-capitals": false,
"extra-auto-correct-files": []
},
"blockquote-style": {
"enabled": true,
"style": "space"
},
"convert-bullet-list-markers": {
"enabled": true
},
"default-language-for-code-fences": {
"enabled": true,
"default-language": "code"
},
"emphasis-style": {
"enabled": false,
"style": "consistent"
},
"no-bare-urls": {
"enabled": false,
"no-bare-uris": false
},
"ordered-list-style": {
"enabled": false,
"number-style": "ascending",
"list-end-style": "."
},
"proper-ellipsis": {
"enabled": true
},
"quote-style": {
"enabled": false,
"single-quote-enabled": true,
"single-quote-style": "''",
"double-quote-enabled": true,
"double-quote-style": "\"\""
},
"remove-consecutive-list-markers": {
"enabled": true
},
"remove-empty-list-markers": {
"enabled": true
},
"remove-hyphenated-line-breaks": {
"enabled": true
},
"remove-multiple-spaces": {
"enabled": true
},
"strong-style": {
"enabled": false,
"style": "consistent"
},
"two-spaces-between-lines-with-content": {
"enabled": false,
"line-break-indicator": " "
},
"unordered-list-style": {
"enabled": false,
"list-style": "consistent"
},
"compact-yaml": {
"enabled": false,
"inner-new-lines": false
},
"consecutive-blank-lines": {
"enabled": false
},
"convert-spaces-to-tabs": {
"enabled": false,
"tabsize": 4
},
"empty-line-around-blockquotes": {
"enabled": false
},
"empty-line-around-code-fences": {
"enabled": true
},
"empty-line-around-horizontal-rules": {
"enabled": false
},
"empty-line-around-math-blocks": {
"enabled": false
},
"empty-line-around-tables": {
"enabled": false
},
"heading-blank-lines": {
"enabled": false,
"bottom": true,
"empty-line-after-yaml": true
},
"line-break-at-document-end": {
"enabled": false
},
"move-math-block-indicators-to-their-own-line": {
"enabled": false
},
"paragraph-blank-lines": {
"enabled": false
},
"remove-empty-lines-between-list-markers-and-checklists": {
"enabled": false
},
"remove-link-spacing": {
"enabled": true
},
"remove-space-around-characters": {
"enabled": false,
"include-fullwidth-forms": true,
"include-cjk-symbols-and-punctuation": true,
"include-dashes": true,
"other-symbols": ""
},
"remove-space-before-or-after-characters": {
"enabled": false,
"characters-to-remove-space-before": ",!?;:).’”]",
"characters-to-remove-space-after": "¿¡‘“(["
},
"space-after-list-markers": {
"enabled": true
},
"space-between-chinese-japanese-or-korean-and-english-or-numbers": {
"enabled": false,
"english-symbols-punctuation-before": "-+;:'\"°%$)]",
"english-symbols-punctuation-after": "-+'\"([¥$"
},
"trailing-spaces": {
"enabled": false,
"twp-space-line-break": false
},
"add-blockquote-indentation-on-paste": {
"enabled": true
},
"prevent-double-checklist-indicator-on-paste": {
"enabled": true
},
"prevent-double-list-item-indicator-on-paste": {
"enabled": true
},
"proper-ellipsis-on-paste": {
"enabled": true
},
"remove-hyphens-on-paste": {
"enabled": true
},
"remove-leading-or-trailing-whitespace-on-paste": {
"enabled": true
},
"remove-leftover-footnotes-from-quote-on-paste": {
"enabled": true
},
"remove-multiple-blank-lines-on-paste": {
"enabled": true
}
},
"lintOnSave": false,
"recordLintOnSaveLogs": false,
"displayChanged": true,
"lintOnFileChange": false,
"displayLintOnFileChangeNotice": false,
"settingsConvertedToConfigKeyValues": true,
"foldersToIgnore": [],
"filesToIgnore": [],
"linterLocale": "system-default",
"logLevel": "DEBUG",
"lintCommands": [],
"customRegexes": [],
"commonStyles": {
"aliasArrayStyle": "single-line",
"tagArrayStyle": "single-line",
"minimumNumberOfDollarSignsToBeAMathBlock": 2,
"escapeCharacter": "\"",
"removeUnnecessaryEscapeCharsForMultiLineArrays": false
}
}
Where would you like me to upload my .obsidian folder for you? I looked in console after it started happening again and it seems like it could be related to the linter > plugin modifying paste a bit. Temporarily disabled linter and it seemed to fix it. Unsure why this did not fix it before. I will attempt to disable parts of either plugin, as you said, as soon as the behavior begins again.
Here is my config in linter:
Thanks for sharing your observations: you can upload your .obsidian in any way you want. I have been using these ways since:
- Convert it to ZIP (if resulting archive is too big, try to more advanced compress algorithm in 7-zip, for example) and just "drop" in the message;
- Create GitHub repository and publish your config folder for Obsidian;
- Use any mirrors and sharing services.
Greetings, sorry for the long wait—, here is a dev build of the plugin with "possible" solutions to the problems; I am sending it to you to try to check whether the problems have been solved, because I have not been able to repeat them myself yet.
Link to install ZIP with dev-build of plugin: dev-version of plugin.zip
[!Note] Please, copy with manifest — it would allow you to mark and ignore possible updates for UNITADE on time of testing dev-build.
Small clarifications on the fixes in the plugin:
- Previously, the "paste" action was triggered twice, once by Monaco itself, and the second time by my incorrect interpretation of the logic of these triggers, roughly speaking, I told Monaco to perform the paste, when it already knew about it and did it;
- Now
addKeyEvents(__keyHandler), i.e. the function for working with hotkeys registers the keypress loader in the editor window, not the application (previouslywindowwas specified, nowthis.containerEl) - in fact, this should isolate "listening" to keybinds outside the code editor; 2.1) Accordingly, I also changed the unloading of all these listeners; 2.2) a condition was added to the listener that further isolates keystrokes:
if (this.getViewType() !== 'codeview') return;
2.3) force vanilla paste now uses the built-in trigger (action) for pasting from Monaco itself, instead of a custom function— now it seems that pasting with this feature should be at the native level, the code now looks like this:
if (this.plugin.settings.code_editor_settings.force_vanilla_paste)
this.monacoEditor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyV,
() => this.monacoEditor.trigger('', 'editor.action.clipboardPasteAction', null));
I would try another ways to repeat your bugs with this/without this dev-build.
Created special prerelease of releases page of project if you have problems with ZIP: https://github.com/Falcion/UNITADE.md/releases/tag/v3.2.5-devbuild.05%2F15%2F2025
Status update: Using ONLY the UNITADE plugin, I was able to get the same bug, but unfortunately I was unable to reproduce it either on the devbuild or on the same version of the plugin.
Surprisingly, even with a complete repetition of the situation and changing various parameters of the moment when the bug appeared - it does not give a result.
Status update: Using ONLY the UNITADE plugin, I was able to get the same bug, but unfortunately I was unable to reproduce it either on the devbuild or on the same version of the plugin.
Surprisingly, even with a complete repetition of the situation and changing various parameters of the moment when the bug appeared - it does not give a result.
Now there is an instruction to repeat the bug, I still don't understand WHY this happens, but for the future:
- download the UNITADE plugin;
- create a new file with the extension integration (code editor extension);
- copy any code (I did this from a third-party source);
- paste it into the file;
- create a new markdown file;
- copy any text (I did this from a third-party source);
- paste into your markdown file;
After that, the text will be duplicated.
@WarmWelcome tested on dev-build, bug fixed, please check on your machine and if fix is successful I will merge pull request and release new version with these fixes.
I am sorry this is coming so late, many things have happened in my life that demanded my attention.
Status update: Using ONLY the UNITADE plugin, I was able to get the same bug, but unfortunately I was unable to reproduce it either on the devbuild or on the same version of the plugin. Surprisingly, even with a complete repetition of the situation and changing various parameters of the moment when the bug appeared - it does not give a result.
Now there is an instruction to repeat the bug, I still don't understand WHY this happens, but for the future:
1. download the UNITADE plugin; 2. create a new file with the extension integration (code editor extension); 3. copy any code (I did this from a third-party source); 4. paste it into the file; 5. create a new markdown file; 6. copy any text (I did this from a third-party source); 7. paste into your markdown file;After that, the text will be duplicated.
Wonderful you were able to replicate this! I was unable to find any way to do so in a repeatable way.
@WarmWelcome tested on dev-build, bug fixed, please check on your machine and if fix is successful I will merge pull request and release new version with these fixes.
How do I install the dev build? Sorry for the dumb question.
I am sorry this is coming so late, many things have happened in my life that demanded my attention.
Status update: Using ONLY the UNITADE plugin, I was able to get the same bug, but unfortunately I was unable to reproduce it either on the devbuild or on the same version of the plugin. Surprisingly, even with a complete repetition of the situation and changing various parameters of the moment when the bug appeared - it does not give a result.
Now there is an instruction to repeat the bug, I still don't understand WHY this happens, but for the future:
1. download the UNITADE plugin; 2. create a new file with the extension integration (code editor extension); 3. copy any code (I did this from a third-party source); 4. paste it into the file; 5. create a new markdown file; 6. copy any text (I did this from a third-party source); 7. paste into your markdown file;After that, the text will be duplicated.
Wonderful you were able to replicate this! I was unable to find any way to do so in a repeatable way.
@WarmWelcome tested on dev-build, bug fixed, please check on your machine and if fix is successful I will merge pull request and release new version with these fixes.
How do I install the dev build? Sorry for the dumb question.
This instruction would be little obscure, but:
-
Install devbuild itself (ZIP or differentiated files): either by link provided in this issue (not the release tag) OR download files from tag: https://github.com/Falcion/UNITADE.md/releases/tag/v3.2.5-devbuild.05%2F15%2F2025
-
Open your vault, "Settings → Community plugins", you would see list of your plugins, you can open
.pluginsfolder of your vault, see the image:
- you would see an explorer with folders for each plugins specifically, we are interested in
unitadefolder:
- open it and paste contents of installed devbuild (files
main.js,styles.cssandmanifest.json), replace source files for plugin. - close your app and re-open it, we need to start UNITADE from scratch with OBSIDIAN's pipeline;
- now, you would see in plugin's list UNITADE as dev-version with specified information:
[!Note] After trying to reproduce the bug, you could reinstall plugin. IMPORTANT: remember to backup your
data.jsonto not lose any settings!
I'm sorry for possible "demanding" vibe, is there any updates on bugfix and etc.? — If it is case in some lower level of priorities (for example, if you have a life, work and etc. - everything which IS more important than this issue), I could possibly ask to test this dev-build by other users and possibly early-merge so when the issue will reoccur you could re-open this ticker or create new, as you wish.
@WarmWelcome
I'm sorry for possible "demanding" vibe, is there any updates on bugfix and etc.? — If it is case in some lower level of priorities (for example, if you have a life, work and etc. - everything which IS more important than this issue), I could possibly ask to test this dev-build by other users and possibly early-merge so when the issue will reoccur you could re-open this ticker or create new, as you wish.
No worries asking, and so sorry for the delay (again). I am currently moving and rushing projects that I need done here to the finish line at the same time. It's probably best to ask other users for now, as I don't believe that I will have the time to troubleshoot for a while unfortunately :(
Thank you for being so patient looking into this by the way, you're a saint <3
Tested with multiple people and multiple machines, bug is nowhere to be found, as it is for a moment - consider as fixed.
For more info about other fixes in this release, read the release notes: https://github.com/Falcion/UNITADE.md/releases/tag/3.2.5 or draft of a pull request: https://github.com/Falcion/UNITADE.md/pull/133