@@ -113,6 +113,15 @@ function M.get_branch(dir)
113
113
if vim .fn .filereadable (branch_session ) ~= 0 then
114
114
return branch
115
115
else
116
+ vim .api .nvim_echo ({
117
+ { " [Persisted.nvim]\n " , " Question" },
118
+ { " Could not load a session for branch " },
119
+ { git_branch [1 ] .. " \n " , " WarningMsg" },
120
+ { " Trying to load a session for branch " },
121
+ { config .options .default_branch , " Title" },
122
+ { " ..." },
123
+ }, true , {})
124
+
116
125
vim .g .persisted_branch_session = branch_session
117
126
return config .options .branch_separator .. config .options .default_branch
118
127
end
@@ -177,17 +186,6 @@ function M.load(opt, dir)
177
186
end
178
187
end
179
188
180
- if session and not session_exists then
181
- vim .api .nvim_echo ({
182
- { " [Persisted.nvim]\n " , " Question" },
183
- { " Could not find a session for " },
184
- { vim .fn .getcwd () .. " \n " , " WarningMsg" },
185
- { " As per " },
186
- { " https://github.com/olimorris/persisted.nvim/discussions/103" , " WarningMsg" },
187
- { " you may need to remove the branch from the name" },
188
- }, true , {})
189
- end
190
-
191
189
if config .options .autosave and (allow_dir (dir ) and not ignore_dir (dir )) then
192
190
M .start ()
193
191
end
0 commit comments