File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 runs-on : ubuntu-latest
1313 steps :
1414 - name : Checkout
15- uses : actions/checkout@v3
16- with :
17- ref : ${{ github.head_ref }}
15+ uses : actions/checkout@v4
1816 - name : Use Node.js 18.x
1917 uses : actions/setup-node@v3
2018 with :
2725 name : Format/Credo
2826 runs-on : ubuntu-latest
2927 steps :
30- - uses : actions/checkout@v3
28+ - uses : actions/checkout@v4
3129 - name : Set up Elixir
3230 uses : erlef/setup-beam@v1
3331 with :
@@ -45,11 +43,37 @@ jobs:
4543 run : mix format --check-formatted
4644 - name : Run Credo
4745 run : mix credo
46+ dialyzer :
47+ name : Dialyzer
48+ runs-on : ubuntu-latest
49+ steps :
50+ - uses : actions/checkout@v4
51+ - name : Set up Elixir
52+ uses : erlef/setup-beam@v1
53+ with :
54+ elixir-version : " 1.19"
55+ otp-version : " 28"
56+ - name : Restore dependencies cache
57+ uses : actions/cache@v3
58+ with :
59+ path : deps
60+ key : ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
61+ restore-keys : ${{ runner.os }}-mix-
62+ - name : Restore dialyzer cache
63+ uses : actions/cache@v3
64+ with :
65+ path : priv/plts
66+ key : ${{ runner.os }}-mix-plts-${{ hashFiles('./priv/plts/') }}
67+ restore-keys : ${{ runner.os }}-mix-plts-
68+ - name : Install dependencies
69+ run : mix deps.get
70+ - name : Run dialyzer
71+ run : mix dialyzer
4872 test :
4973 name : Test
5074 runs-on : ubuntu-latest
5175 steps :
52- - uses : actions/checkout@v3
76+ - uses : actions/checkout@v4
5377 - name : Set up Elixir
5478 uses : erlef/setup-beam@v1
5579 with :
Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5- The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0 .0/ ) ,
5+ The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.1 .0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8- ## v0 .5.1 - 2026-02-22
8+ ## [ 0 .5.1] - 2026-02-22
99
10- ** Added**
10+ ### Added
1111
12- - Better documented typespecs. ( [ # 11 ] ( https://github.com/codedge-llc/pane/pull/11 ) )
13- - More tests for ` Pane.Page ` and ` Pane.Viewer ` . ( [ # 11 ] ( https://github.com/codedge-llc/pane/pull/11 ) )
12+ - Better documented typespecs.
13+ - Unit tests for ` Pane.Page ` and ` Pane.Viewer ` .
1414
15- ** Fixed**
15+ ### Fixed
1616
1717- Terminal size detection on Windows (replaced ` tput ` with ` :io.rows/0 ` ).
18- ([ #11 ] ( https://github.com/codedge-llc/pane/pull/11 ) )
1918
20- ## v0 .5.0 - 2024-08-31
19+ ## [ 0 .5.0] - 2024-08-31
2120
22- ** Changed**
21+ ### Changed
2322
2423- Various documentation updates ([ #5 ] ( https://github.com/codedge-llc/pane/pull/5 ) ).
2524- Bumped minimum Elixir version to 1.13.
2625
27- ## v0 .4.1 - 2021-02-27
26+ ## [ 0 .4.1] - 2021-02-27
2827
29- ** Fixed**
28+ ### Fixed
3029
3130- Include ` :iex ` in ` :extra_applications ` to remove compile warning.
3231
33- ## v0 .4.0 - 2020-09-28
32+ ## [ 0 .4.0] - 2020-09-28
3433
35- ** Changed**
34+ ### Changed
3635
3736- Bump minimum Elixir version to 1.5.
3837
39- ** Fixed**
38+ ### Fixed
4039
4140- Remove deprecated compile warnings.
4241
43- ## v0 .3.0 - 2018-01-18
42+ ## [ 0 .3.0] - 2018-01-18
4443
4544- Support for (f)first and (l)last page
4645
47- ## v0 .2.0 - 2018-01-03
46+ ## [ 0 .2.0] - 2018-01-03
4847
4948- Prompt to enable ANSI codes if disabled
5049
51- ## v0 .1.1 - 2017-03-16
50+ ## [ 0 .1.1] - 2017-03-16
5251
5352- Fix: crash on invalid key command
5453
55- ## v0 .1.0 - 2017-02-26
54+ ## [ 0 .1.0] - 2017-02-26
5655
5756- Initial release
Original file line number Diff line number Diff line change 11defmodule Pane.Viewer do
22 @ moduledoc false
33
4- defstruct pages: [ ] , total_pages: 0 , index : 0
4+ defstruct index: 0 , pages: [ ] , total_pages : 0
55
66 use GenServer
77
88 @ type t :: % __MODULE__ {
9+ index: non_neg_integer ( ) ,
910 pages: [ Pane.Page . t ( ) ] ,
10- total_pages: non_neg_integer ( ) ,
11- index: non_neg_integer ( )
11+ total_pages: non_neg_integer ( )
1212 }
1313
1414 @ default_max_lines 50
@@ -39,13 +39,13 @@ defmodule Pane.Viewer do
3939 iex> Pane.Viewer.init(data: "test")
4040 {:ok, %Pane.Viewer{
4141 index: 0,
42- total_pages: 1,
4342 pages: [
4443 %Pane.Page{
4544 data: "test",
4645 index: 0
4746 }
48- ]
47+ ],
48+ total_pages: 1
4949 }}
5050 """
5151 def init ( opts ) do
You can’t perform that action at this time.
0 commit comments