aboutsummaryrefslogtreecommitdiff
path: root/doc/td.en.1.in
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-18 12:39:05 -0300
committerEuAndreh <eu@euandre.org>2022-01-18 14:03:01 -0300
commitc31a9bf00125588682a20869924fc7b7a5c7d4a1 (patch)
tree288b50f51c355604ecc038d7f4f5694c748580a0 /doc/td.en.1.in
parentFirst commit, now with a clean history (diff)
downloadtd-c31a9bf00125588682a20869924fc7b7a5c7d4a1.tar.gz
td-c31a9bf00125588682a20869924fc7b7a5c7d4a1.tar.xz
src/td.in: Add optimal_line_for_type()
Use the new function in insert_at_line(): whenever a given line $N is equal to 0, meaning it doesn't exist yet in the file, the optimal_line_for_type() will scan the file and answer with the "optimal" line number that the the type should be inserted at. It does that by looking at the order in which types apper in $TD_TYPES, and compare that with $TD_FILE: - if a previous type has appeared already, it continues scanning the file until a different level 1 heading appears, or until the end of the file; - if a type that comes after appears, it gets inserted before it; - if no types exist in the file yet, it gets inserted at the end. It fixes #td-05580844-40db-0db6-b11e-9f041a08c0a7.
Diffstat (limited to 'doc/td.en.1.in')
0 files changed, 0 insertions, 0 deletions