PR #1818 <https://github.com/leo-editor/leo-editor/pull/1818> deletes
c.trimTrailingLines. The old version was:
def trimTrailingLines(self, p):
body = p.b
lines = body.split('\n')
i = len(lines) - 1; changed = False
while i >= 0:
line = lines[i]
j = g.skip_ws(line, 0)
if j + 1 == len(line):
del lines[i]
i -= 1; changed = True
else: break
if changed:
p.b = ''.join(body) + '\n' # Add back one last newline.
# Don't set the dirty bit: it would just be annoying.
Notice a bug: the code doesn't use the lines array at all!
The new code simply ignores this method, but that is not *exactly*
equivalent to the old code.
So now there is a dilemma. The old code is very bad, but even seemingly
minor changes in the @root logic could be troublesome.
I am tempted, at last, to remove @root. It is, on purpose, not documented.
Otoh, I don't want to inconvenience people who might be still using @root.
So for now, I am just going warn about the change. If you are affected by
the new code, please let me know.
Edward
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/baf1a94c-cc8b-406e-9f21-c67ada920fe4n%40googlegroups.com.