core: remove gap after read marker line when there is no bar on the right (bug #39548)