vonshednob / pter

Manage your todo.txt in a commandline user interface (TUI)
https://vonshednob.cc/pter/
MIT License
104 stars 6 forks source link

pter adds CRLF line terminators on Linux #11

Closed maxigaz closed 2 years ago

maxigaz commented 2 years ago

Steps to reproduce (tested under Manjaro Linux with pter 3.0.0):

  1. Create a new todo.txt in Vim or Neovim, add a few tasks, and exit the editor.
  2. Run file todo.txt. It should show the following output:

    todo.txt: Unicode text, UTF-8 text
  3. Open todo.txt in pter, make some edits (for example, mark a task as done).
  4. Run file todo.txt again. Now it shows the following:

    todo.txt: Unicode text, UTF-8 text, with CRLF line terminators

Neovim also shows this change, by running :set ff or looking at luabar with the default configuration.

While I'm not seeing any negative effects of this right now, a few weeks ago, when I opened one of my todo.txt files in Neovim, I noticed that it contained ^M at the end of every line. Then I realised it had been edited with pter. I think that was somehow related to this issue.

vonshednob commented 2 years ago

Please try to update pytodotxt through pip install -U pytodotxt. There has been a fix recently that addresses that problem.

Let me know if that does the trick!

maxigaz commented 2 years ago

Yes, updating that package fixes the issue. Thank you!