Skip to content

Corrupted indentation with commentary_startofline = 1 #123

@dnezamaev

Description

@dnezamaev

TL;DR videos: first and second

Suppose we have C/C++ code like this, cursor on 'int x = 1' and doing motion like 'gcd' to comment two strings.

int main(int argc, char *argv[])
{
  int x = 1;
  //return 0;
}

Then we repeat same action to uncomment and loosing one space of indentation on each uncommenting on that two strings.

Important things here:

  1. b:commentary_startofline=1
  2. return string is already commented without space (slashes are closely to text)
  3. commentstring value does not matter, it can be reproduced with default /*%s*/
  4. filetype does not matter, it can be reproduced on python code also
  5. adding one more string after '//return' makes it even worse (see first video)

P.S. Thank you for plugins, they are cool! =)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions