SpaceVim / SpaceVim

A modular Vim/Neovim configuration
https://spacevim.org/
GNU General Public License v3.0
20.31k stars 1.42k forks source link

activating mundo through F7 results in an error #4047

Closed mkurop closed 3 years ago

mkurop commented 3 years ago

Expected behavior, english is required

After pressing F7 in vim/spacevim I would expect the new window with editing undo tree, however an error occurs:

Error detected while processing function dein#autoload#_on_cmd[13]..mundo#MundoToggle[1]..<SNR>266_MundoToggle[4]│
..<SNR>266_MundoOpen[38]..<SNR>266_MundoPythonRestoreView[10]..<SNR>266_MundoPython:                             │
line    1:                                                                                                       │
Traceback (most recent call last):                                                                               │
  File "<string>", line 1, in <module>                                                                           │
  File "/home/marcin/.SpaceVim/bundle/vim-mundo/autoload/mundo.py", line 128, in MundoRenderGraph                │
    nodesData                                                                                                    │
  File "/home/marcin/.SpaceVim/bundle/vim-mundo/autoload/mundo/graphlog.py", line 206, in generate               │
    preview_diff = nodesData.preview_diff(node.parent, node, False, show_inine_diff)                             │
  File "/home/marcin/.SpaceVim/bundle/vim-mundo/autoload/mundo/node.py", line 197, in preview_diff               │
    before_lines = self._get_lines(before)                                                                       │
  File "/home/marcin/.SpaceVim/bundle/vim-mundo/autoload/mundo/node.py", line 121, in _get_lines                 │
    util._undo_to(n)                                                                                             │
  File "/home/marcin/.SpaceVim/bundle/vim-mundo/autoload/mundo/util.py", line 50, in _undo_to                    │
    vim().command('silent undo %d' % int(n))                                                                     │
vim.error: Vim(undo):E438: u_undo: line numbers wrong  

The reproduce ways from Vim starting (Required!)

After starting vim and loading a particular file (the file matters, for other files the error does not occur) and pressing F7 the above error shows up.

Debug info

SpaceVim layers:

+ VersionControl:           loaded          https://spacevim.org/layers/VersionControl/
+ autocomplete:             loaded          https://spacevim.org/layers/autocomplete/
- chat:                 not loaded          https://spacevim.org/layers/chat/
+ checkers:                 loaded          https://spacevim.org/layers/checkers/
- chinese:              not loaded          https://spacevim.org/layers/chinese/
- colorscheme:          not loaded          https://spacevim.org/layers/colorscheme/
+ core#banner:              loaded          https://spacevim.org/layers/core/banner/
+ core#statusline:          loaded          https://spacevim.org/layers/core/statusline/
+ core#tabline:             loaded          https://spacevim.org/layers/core/tabline/
+ core:                     loaded          https://spacevim.org/layers/core/
- cscope:               not loaded          https://spacevim.org/layers/cscope/
- ctrlp:                not loaded          https://spacevim.org/layers/ctrlp/
- ctrlspace:            not loaded          https://spacevim.org/layers/ctrlspace/
+ debug:                    loaded          https://spacevim.org/layers/debug/
- denite:               not loaded          https://spacevim.org/layers/denite/
+ edit:                     loaded          https://spacevim.org/layers/edit/
- exprfold:             not loaded          no exists
- floobits:             not loaded          https://spacevim.org/layers/floobits/
- foldsearch:           not loaded          https://spacevim.org/layers/foldsearch/
+ format:                   loaded          https://spacevim.org/layers/format/
- fuzzy:                not loaded          no exists
+ fzf:                      loaded          https://spacevim.org/layers/fzf/
- games:                not loaded          no exists
+ git:                      loaded          https://spacevim.org/layers/git/
- github:               not loaded          https://spacevim.org/layers/github/
+ gtags:                    loaded          https://spacevim.org/layers/gtags/
- incsearch:            not loaded          no exists
- indentmove:           not loaded          no exists
- japanese:             not loaded          https://spacevim.org/layers/japanese/
- lang#WebAssembly:     not loaded          https://spacevim.org/layers/lang/WebAssembly/
- lang#actionscript:    not loaded          https://spacevim.org/layers/lang/actionscript/
- lang#agda:            not loaded          https://spacevim.org/layers/lang/agda/
- lang#asciidoc:        not loaded          https://spacevim.org/layers/lang/asciidoc/
- lang#aspectj:         not loaded          https://spacevim.org/layers/lang/aspectj/
- lang#assembly:        not loaded          https://spacevim.org/layers/lang/assembly/
- lang#autohotkey:      not loaded          https://spacevim.org/layers/lang/autohotkey/
- lang#batch:           not loaded          https://spacevim.org/layers/lang/batch/
+ lang#c:                   loaded          https://spacevim.org/layers/lang/c/
- lang#chapel:          not loaded          https://spacevim.org/layers/lang/chapel/
- lang#clojure:         not loaded          https://spacevim.org/layers/lang/clojure/
- lang#coffeescript:    not loaded          https://spacevim.org/layers/lang/coffeescript/
- lang#crystal:         not loaded          https://spacevim.org/layers/lang/crystal/
- lang#csharp:          not loaded          https://spacevim.org/layers/lang/csharp/
- lang#d:               not loaded          https://spacevim.org/layers/lang/d/
- lang#dart:            not loaded          https://spacevim.org/layers/lang/dart/
- lang#dockerfile:      not loaded          https://spacevim.org/layers/lang/dockerfile/
- lang#eiffel:          not loaded          https://spacevim.org/layers/lang/eiffel/
- lang#elixir:          not loaded          https://spacevim.org/layers/lang/elixir/
- lang#elm:             not loaded          https://spacevim.org/layers/lang/elm/
- lang#erlang:          not loaded          https://spacevim.org/layers/lang/erlang/
- lang#extra:           not loaded          https://spacevim.org/layers/lang/extra/
- lang#factor:          not loaded          no exists
- lang#forth:           not loaded          no exists
- lang#fortran:         not loaded          https://spacevim.org/layers/lang/fortran/
- lang#foxpro:          not loaded          https://spacevim.org/layers/lang/foxpro/
- lang#fsharp:          not loaded          https://spacevim.org/layers/lang/fsharp/
- lang#go:              not loaded          https://spacevim.org/layers/lang/go/
- lang#goby:            not loaded          https://spacevim.org/layers/lang/goby/
- lang#gosu:            not loaded          https://spacevim.org/layers/lang/gosu/
- lang#graphql:         not loaded          https://spacevim.org/layers/lang/graphql/
- lang#groovy:          not loaded          https://spacevim.org/layers/lang/groovy/
- lang#hack:            not loaded          https://spacevim.org/layers/lang/hack/
- lang#haskell:         not loaded          https://spacevim.org/layers/lang/haskell/
- lang#html:            not loaded          https://spacevim.org/layers/lang/html/
- lang#hy:              not loaded          https://spacevim.org/layers/lang/hy/
- lang#idris:           not loaded          https://spacevim.org/layers/lang/idris/
- lang#io:              not loaded          https://spacevim.org/layers/lang/io/
- lang#ipynb:           not loaded          https://spacevim.org/layers/lang/ipynb/
- lang#j:               not loaded          https://spacevim.org/layers/lang/j/
- lang#janet:           not loaded          https://spacevim.org/layers/lang/janet/
- lang#java:            not loaded          https://spacevim.org/layers/lang/java/
- lang#javascript:      not loaded          https://spacevim.org/layers/lang/javascript/
- lang#json:            not loaded          no exists
- lang#julia:           not loaded          https://spacevim.org/layers/lang/julia/
- lang#kotlin:          not loaded          https://spacevim.org/layers/lang/kotlin/
- lang#lasso:           not loaded          https://spacevim.org/layers/lang/lasso/
- lang#latex:           not loaded          https://spacevim.org/layers/lang/latex/
- lang#lisp:            not loaded          https://spacevim.org/layers/lang/lisp/
- lang#livescript:      not loaded          https://spacevim.org/layers/lang/livescript/
- lang#lua:             not loaded          https://spacevim.org/layers/lang/lua/
- lang#markdown:        not loaded          https://spacevim.org/layers/lang/markdown/
- lang#matlab:          not loaded          https://spacevim.org/layers/lang/matlab/
- lang#moonscript:      not loaded          https://spacevim.org/layers/lang/moonscript/
- lang#nim:             not loaded          https://spacevim.org/layers/lang/nim/
- lang#nix:             not loaded          https://spacevim.org/layers/lang/nix/
- lang#ocaml:           not loaded          https://spacevim.org/layers/lang/ocaml/
- lang#pact:            not loaded          https://spacevim.org/layers/lang/pact/
- lang#pascal:          not loaded          https://spacevim.org/layers/lang/pascal/
- lang#perl:            not loaded          https://spacevim.org/layers/lang/perl/
- lang#php:             not loaded          https://spacevim.org/layers/lang/php/
- lang#plantuml:        not loaded          https://spacevim.org/layers/lang/plantuml/
- lang#pony:            not loaded          https://spacevim.org/layers/lang/pony/
- lang#powershell:      not loaded          https://spacevim.org/layers/lang/powershell/
- lang#processing:      not loaded          https://spacevim.org/layers/lang/processing/
- lang#prolog:          not loaded          https://spacevim.org/layers/lang/prolog/
- lang#puppet:          not loaded          https://spacevim.org/layers/lang/puppet/
- lang#purescript:      not loaded          https://spacevim.org/layers/lang/purescript/
- lang#python:          not loaded          https://spacevim.org/layers/lang/python/
- lang#r:               not loaded          https://spacevim.org/layers/lang/r/
- lang#racket:          not loaded          https://spacevim.org/layers/lang/racket/
- lang#red:             not loaded          https://spacevim.org/layers/lang/red/
- lang#ring:            not loaded          https://spacevim.org/layers/lang/ring/
- lang#ruby:            not loaded          https://spacevim.org/layers/lang/ruby/
- lang#rust:            not loaded          https://spacevim.org/layers/lang/rust/
- lang#scala:           not loaded          https://spacevim.org/layers/lang/scala/
- lang#scheme:          not loaded          https://spacevim.org/layers/lang/scheme/
- lang#sh:              not loaded          https://spacevim.org/layers/lang/sh/
- lang#slim:            not loaded          https://spacevim.org/layers/lang/slim/
- lang#solidity:        not loaded          no exists
- lang#sql:             not loaded          no exists
- lang#supercollider:   not loaded          no exists
- lang#swift:           not loaded          https://spacevim.org/layers/lang/swift/
- lang#swig:            not loaded          no exists
- lang#tcl:             not loaded          https://spacevim.org/layers/lang/tcl/
- lang#toml:            not loaded          https://spacevim.org/layers/lang/toml/
- lang#typescript:      not loaded          https://spacevim.org/layers/lang/typescript/
- lang#v:               not loaded          https://spacevim.org/layers/lang/v/
- lang#vbnet:           not loaded          https://spacevim.org/layers/lang/vbnet/
- lang#vim:             not loaded          https://spacevim.org/layers/lang/vim/
- lang#vue:             not loaded          https://spacevim.org/layers/lang/vue/
- lang#wdl:             not loaded          no exists
- lang#wolfram:         not loaded          https://spacevim.org/layers/lang/wolfram/
- lang#xml:             not loaded          https://spacevim.org/layers/lang/xml/
- lang#xquery:          not loaded          no exists
- lang#zig:             not loaded          https://spacevim.org/layers/lang/zig/

Please press SPC h I, debug info will be put into clipboard, then paste all content below.

Screenshots

Before pressing F7: Zrzut ekranu z 2021-01-07 16-49-42 After pressing F7: Screenshot from 2021-01-07 16-52-38

If you have any screenshots for this issue, please upload here. BTW you can use https://asciinema.org/ for recording video in terminal.

wsdjeg commented 3 years ago

It seems a bug of mundo, but I can not reproduce it in my os,

mkurop commented 3 years ago

how can i replace mundo with undotree?

mkurop commented 3 years ago

I replaced mundo with undotree by mapping the F7 key to UndotreeToggle command. This setup works fine on the affected file.