diff options
| author | A Farzat <a@farzat.xyz> | 2022-05-14 15:57:07 +0900 |
|---|---|---|
| committer | A Farzat <a@farzat.xyz> | 2022-05-14 15:57:07 +0900 |
| commit | 8499a1e4730828b46cdf03dfc285556b70a1a610 (patch) | |
| tree | c0667b186ef094aaa7fa4bbe54b94c630235daa5 | |
| parent | a4abdb28fffe966d6888a83d083685fadd17f7a1 (diff) | |
| parent | 257ae01ffcec943804989ff24e73dceec2fea654 (diff) | |
| download | edit-8499a1e4730828b46cdf03dfc285556b70a1a610.tar.gz edit-8499a1e4730828b46cdf03dfc285556b70a1a610.zip | |
Merge branch 'noeol'
| -rw-r--r-- | edit.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -65,6 +65,9 @@ def read_file(path, buf): with open(PATH) as f: text = f.read() + if text[-1] == "\n": + text = text[:-1] # remove trailing newline if exists. + weechat.buffer_set(buf, "input", text) weechat.buffer_set(buf, "input_pos", str(len(text))) |
