orgmode icon indicating copy to clipboard operation
orgmode copied to clipboard

last line in src block not overwritten when edit special write

Open tinunkai opened this issue 2 years ago • 2 comments

https://github.com/nvim-orgmode/orgmode/blob/d791e8fe9f4e5a6b64ea8642476b7d9ba246939c/lua/orgmode/objects/edit_special/types/src.lua#L126

Maybe this - 1 is unnecessary?

tinunkai avatar Apr 26 '22 08:04 tinunkai

Do you have a way to reproduce this @tinunkai? Just a .org file sample or similar will do.

Below there are two cases shown:

  1. When the SRC block sits on the last line of the buffer - with this case there are known issues due to something with the Treesitter parser.
  2. When the SRC block does not sit on the last line of the buffer - everything works as expected.

https://user-images.githubusercontent.com/31262046/165331330-2456c0e9-b490-492a-972d-5412d5ed4b04.mp4

levouh avatar Apr 26 '22 14:04 levouh

Yeah, it's the situation that the SRC block sits on the last line of the buffer. It works fine elsewise. Thank you!

tinunkai avatar Apr 26 '22 22:04 tinunkai