diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-02-08 15:53:39 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-02-08 18:33:32 +0100 |
| commit | cebb24b36ac45cc7c6912481cacd29ef9d5c68b9 (patch) | |
| tree | 7067e0ace5cff699584d9c869b2c8bb380beff38 /text.c | |
| parent | 18e0c03c3f3bda24e05c5200b53fe95f9b33475b (diff) | |
| download | vis-cebb24b36ac45cc7c6912481cacd29ef9d5c68b9.tar.gz vis-cebb24b36ac45cc7c6912481cacd29ef9d5c68b9.tar.xz | |
text: remove special case for marks at start of file
Unlike EOF address 0 needs no special treatment.
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -1628,8 +1628,6 @@ size_t text_lineno_by_pos(Text *txt, size_t pos) { } Mark text_mark_set(Text *txt, size_t pos) { - if (pos == 0) - return (Mark)&txt->begin; if (pos == txt->size) return (Mark)&txt->end; Location loc = piece_get_extern(txt, pos); @@ -1643,8 +1641,6 @@ size_t text_mark_get(Text *txt, Mark mark) { if (mark == EMARK) return EPOS; - if (mark == (Mark)&txt->begin) - return 0; if (mark == (Mark)&txt->end) return txt->size; |
