Skip to content

W motion error when the computed motion jumps over _any_ Python code #509

@kitmonisit

Description

@kitmonisit

I use junegunn/vim-plug manager. Here is my minimum .vimrc. I added a line as advised in #44

set foldmethod=indent
let g:EasyMotion_skipfoldedline = 0

call plug#begin('~/.vim/plugged')
Plug 'easymotion/vim-easymotion'
call plug#end()

Here is a simple Python file for testing convenience:

import this

def test_this():
    print()
    print()
    print()

def test_that():
    print()
    print()
    print()

To reproduce the error:

  1. ❌ Fold the test_this function, put cursor above the folded function, then press <Leader><Leader>w. Error.
  2. ✔️ Put cursor below the folded function, then press <Leader><Leader>w. It works.
  3. ❌ j motion errors out when trying to jump over folds.
  4. ✔️ b motion can jump over folds without any error.
  5. ✔️ k motion can jump over folds without any error.

Strangely though, I have tried "jumping over folds" with my .vimrc and it works very well. I've only observed this in Python.

The error message in the vim status bar is:

EasyMotion: Vim(call):E475: Invalid argument: -1 : function EasyMotion#WB[4]..<SNR>32_EasyMotion, line 109

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions