lib/termnote/pane/code.rb in termnote-1.1.0 vs lib/termnote/pane/code.rb in termnote-1.5.0
- old
+ new
@@ -17,8 +17,17 @@
private
def highlighted
Pygments.highlight source, formatter: 'terminal256', lexer: language
end
+
+ def gutter_width(row)
+ width * 0.25
+ end
+
+ def space
+ newlines = height > rows.size ? (height - rows.size) / 2 : 0
+ "\n" * newlines
+ end
end
end
end