Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: merge shada after VimLeave, #612. #769

Merged
merged 2 commits into from
May 27, 2023
Merged

fix: merge shada after VimLeave, #612. #769

merged 2 commits into from
May 27, 2023

Conversation

ayamir
Copy link
Owner

@ayamir ayamir commented May 26, 2023

No description provided.

Signed-off-by: ayamir <lgt986452565@gmail.com>
@ayamir ayamir linked an issue May 26, 2023 that may be closed by this pull request
2 tasks
@ayamir
Copy link
Owner Author

ayamir commented May 26, 2023

I want to make Telescope oldfiles works normally because sometimes Telescope frecency can't record file opened in time. If no further work, I will make this pr ready for review.

Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I mean in #612 is we should modify 'shada' (the option). In fact, the current issue is previous ShaDa file(s) won't get merged with the ShaDa in memory since we supplied ! (forced):

						    *:wsh* *:wshada* *E137*
:wsh[ada][!] [file]	Write to ShaDa file [file] (default: see above).
			The information in the file is first read in to make
			a merge between old and new info.  When [!] is used,
			the old information is not read first, only the
			internal info is written (also disables safety checks
			described in |shada-error-handling|).  If 'shada' is
			empty, marks for up to 100 files will be written.
			When you get error "E929: All .tmp.X files exist,
			cannot write ShaDa file!" check that no old temp files
			were left behind (e.g.
			~/.local/state/nvim/shada/main.shada.tmp*).

			Note: Executing :wshada will reset all |'quote| marks.

@ayamir ayamir changed the title fix: don't write shada after VimLeave, #612. fix: don't overwrite shada after VimLeave, #612. May 27, 2023
@ayamir ayamir changed the title fix: don't overwrite shada after VimLeave, #612. fix: merge shada after VimLeave, #612. May 27, 2023
Copy link
Collaborator

@Jint-lzxy Jint-lzxy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ayamir @fecet Is Telescope oldfiles working properly now?

@fecet
Copy link
Contributor

fecet commented May 27, 2023

@ayamir @fecet Is Telescope oldfiles working properly now?

I have set this to "wshada" and everything works fine since that time.

@Jint-lzxy Jint-lzxy marked this pull request as ready for review May 27, 2023 14:50
@Jint-lzxy Jint-lzxy merged commit 4d1ea04 into main May 27, 2023
2 checks passed
@Jint-lzxy Jint-lzxy deleted the fix/old-files branch May 27, 2023 16:23
singlemancombat pushed a commit to singlemancombat/nvim-config that referenced this pull request May 27, 2023
* fix: don't write shada after VimLeave, ayamir#612.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* fixup! fix: don't write shada after VimLeave, ayamir#612.

---------

Signed-off-by: ayamir <lgt986452565@gmail.com>
Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com>
csyJoy pushed a commit to csyJoy/nvimdots that referenced this pull request Jun 4, 2023
* fix: don't write shada after VimLeave, ayamir#612.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* fixup! fix: don't write shada after VimLeave, ayamir#612.

---------

Signed-off-by: ayamir <lgt986452565@gmail.com>
Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com>
bleedingfight pushed a commit to bleedingfight/nvimdots that referenced this pull request Jun 22, 2023
* fix: don't write shada after VimLeave, ayamir#612.

Signed-off-by: ayamir <lgt986452565@gmail.com>

* fixup! fix: don't write shada after VimLeave, ayamir#612.

---------

Signed-off-by: ayamir <lgt986452565@gmail.com>
Co-authored-by: Jint-lzxy <50296129+Jint-lzxy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lost file history
3 participants