Skip to content

Buffer.Word() fails if run on the last word in a buffer #4

@trapgate

Description

@trapgate

Buffer.Word() fails to expand the region if you run it on the last word in the buffer and there's no whitespace between the word and EOF. To reproduce:

  1. Fire up lime
  2. Create a new buffer with ctrl-n
  3. Enter a word in the new buffer.
  4. Double click to expand the selection to the whole word. This will fail - the selection will not expand, or may expand but not include the final character in the word.

If you add a trailing space or newline after the word, things will work as expected.

There's currently a workaround in the lime sources in transpose_test.go for this problem - when this is fixed the workaround (an extra newline in a buffer) can be removed.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5923385-buffer-word-fails-if-run-on-the-last-word-in-a-buffer?utm_campaign=plugin&utm_content=tracker%2F7240968&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F7240968&utm_medium=issues&utm_source=github).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions