tpope / vim-obsession

obsession.vim: continuously updated session files
http://www.vim.org/scripts/script.php?script_id=4472
1.75k stars 68 forks source link

tagbar #57

Open cridemichel opened 5 years ago

cridemichel commented 5 years ago

Dear developer, if 'set sessionsoptions-=blank' is used, tagbar (https://github.com/majutsushi/tagbar) is not restored on reloading the session... Below I attached a diff -u with the needed change to fix this issue,

best C.

--- obsession_orig.vim  2019-07-28 09:38:50.000000000 +0200
+++ obsession.vim   2019-07-28 09:39:00.000000000 +0200
@@ -73,7 +73,9 @@
   let sessionoptions = &sessionoptions
   if exists('g:this_obsession')
     try
-      set sessionoptions-=blank sessionoptions-=options sessionoptions+=tabpages
+      "tagbar is considered a blank windows by vim and thus it is not reopened if -=blank is used
+      set sessionoptions-=options sessionoptions+=tabpages
+      "set sessionoptions-=blank sessionoptions-=options sessionoptions+=tabpages
       execute 'mksession! '.fnameescape(g:this_obsession)
       let body = readfile(g:this_obsession)
       call insert(body, 'let g:this_session = v:this_session', -3)
ssh352 commented 4 years ago

tag bar indeed still have problems