Skip to content

Commit

Permalink
Fine tuning line wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenldl committed Oct 7, 2023
1 parent 1623a4a commit d6fa28a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.6.3

- Further underestimate space available for the purpose of line wrapping

## 1.6.2

- Fixed line wrapping
Expand Down
4 changes: 2 additions & 2 deletions bin/multi_file_view.ml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ module Top_pane = struct
let document_info = document_info_s.(document_selected) in
let$* (term_width, _term_height) = Lwd.get Ui_base.Vars.term_width_height in
let width =
(* Deducting 1 for the middle pane separator bar *)
term_width / 2 - 1
(* Minus 1 for pane separator bar *)
term_width / 2 - 1 - Params.line_wrap_underestimate_offset
in
Nottui_widgets.v_pane
(Ui_base.Content_view.main
Expand Down
2 changes: 2 additions & 0 deletions bin/params.ml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ let index_dir = ref ""
let hash_chunk_size = 4096

let text_editor = ref ""

let line_wrap_underestimate_offset = 2
2 changes: 1 addition & 1 deletion bin/single_file_view.ml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ module Top_pane = struct
Lwd.get Ui_base.Vars.Single_file.index_of_search_result_selected
in
let$* (term_width, _term_height) = Lwd.get Ui_base.Vars.term_width_height in
let width = term_width in
let width = term_width - Params.line_wrap_underestimate_offset in
Nottui_widgets.v_pane
(Ui_base.Content_view.main
~width
Expand Down
2 changes: 1 addition & 1 deletion bin/version_string.ml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
let s = "1.6.2"
let s = "1.6.3"

0 comments on commit d6fa28a

Please sign in to comment.