File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -734,6 +734,8 @@ impl ViewContainer for Hunk {
734734 }
735735}
736736
737+ pub const LINENO_MARGIN : & str = " " ;
738+
737739impl ViewContainer for Line {
738740 fn is_empty ( & self , _context : & mut StatusRenderContext < ' _ > ) -> bool {
739741 // lines could not be empty
@@ -886,7 +888,7 @@ impl ViewContainer for Line {
886888 }
887889 } else {
888890 // MARGIN FOR LINENO
889- buffer. insert ( iter, " " ) ;
891+ buffer. insert ( iter, LINENO_MARGIN ) ;
890892 buffer. insert ( iter, content) ;
891893 }
892894 }
@@ -923,7 +925,8 @@ impl ViewContainer for Line {
923925 } ;
924926 // do not add tag twice
925927 // magic 1 is for label
926- start_iter. forward_chars ( stripped_len as i32 + 1 ) ;
928+ println ! ( "‼️ line_offset {:?} stripped_len {:?}" , start_iter. line_offset( ) , stripped_len) ;
929+ start_iter. forward_chars ( ( stripped_len + LINENO_MARGIN . len ( ) ) as i32 ) ;
927930 self . add_tag (
928931 buffer,
929932 spaces_tag,
You can’t perform that action at this time.
0 commit comments