Skip to content

Commit c9d4f4f

Browse files
committed
remove trailing spaces
1 parent 388f1f8 commit c9d4f4f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

stdlib/REPL/docs/src/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,14 +1054,14 @@ Aside from the overall `charset` option, for `RadioMenu` the configurable option
10541054
- `scroll_wrap::Bool=false`: optionally wrap-around at the beginning/end of a menu
10551055
- `ctrl_c_interrupt::Bool=true`: If `false`, return empty on ^C, if `true` throw InterruptException() on ^C
10561056
- `on_cancel::Union{Nothing, Int}`: added in REPL v1.12; recommended value is `nothing` for consistency
1057-
- `header::String`: added in REPL v1.12; default is "".
1057+
- `header::String`: added in REPL v1.12; default is "".
10581058
Call `RadioMenu` constructor with kwarg `header=true` to set header to "[press: Enter=select, q=abort]"
10591059

10601060
In `MultiSelectMenu`, the added/differing fields are:
10611061

10621062
- `checked::String="[X]"|"✓"`: string to use for checked
10631063
- `unchecked::String="[ ]"|"⬚")`: string to use for unchecked
1064-
- `on_cancel::Union{Nothing, Set{Int}}`: added in REPL v1.12; default is empty set for backward compat.
1064+
- `on_cancel::Union{Nothing, Set{Int}}`: added in REPL v1.12; default is empty set for backward compat.
10651065
It is recommended to set `on_cancel=nothing` to be able to discriminate between "nothing selected" vs. "aborted".
10661066
- `header::String`: added in REPL v1.12; default is "[press: Enter=toggle, a=all, n=none, d=done, q=abort]. "
10671067
Call `MultiSelectMenu` constructor with kwarg `header=false` to display no header.

stdlib/REPL/src/TerminalMenus/MultiSelectMenu.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ end
3939

4040
const default_msm_header = "[press: Enter=toggle, a=all, n=none, d=done, q=abort]"
4141

42-
MultiSelectMenu(options, pagesize, pageoffset, selected, config) =
42+
MultiSelectMenu(options, pagesize, pageoffset, selected, config) =
4343
MultiSelectMenu(options, pagesize, pageoffset, selected, Set{Int64}(), default_msm_header, config)
4444

4545
"""
@@ -64,7 +64,7 @@ Any additional keyword arguments will be passed to [`TerminalMenus.MultiSelectCo
6464
!!! compat "Julia 1.6"
6565
The `selected` argument requires Julia 1.6 or later.
6666
"""
67-
function MultiSelectMenu(options::Array{String,1};
67+
function MultiSelectMenu(options::Array{String,1};
6868
on_cancel=Set{Int64}(), header=true, pagesize::Int=10, selected=Int[], warn::Bool=true, kwargs...)
6969

7070
length(options) < 1 && error("MultiSelectMenu must have at least one option")
@@ -82,9 +82,9 @@ function MultiSelectMenu(options::Array{String,1};
8282
push!(_selected, item)
8383
end
8484

85-
is_not_legacy = isnothing(on_cancel) || (header != true) || !isempty(kwargs)
85+
is_not_legacy = isnothing(on_cancel) || (header != true) || !isempty(kwargs)
8686

87-
if header == true
87+
if header == true
8888
header = default_msm_header
8989
elseif header == false
9090
header = ""

stdlib/REPL/src/TerminalMenus/RadioMenu.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const default_radio_header = "[press: Enter=select, q=abort]"
3838
"""
3939
4040
RadioMenu(options::Vector{String}; pagesize::Int=10,
41-
on_cancel::Union{Nothing, Int}=-1,
42-
header::Union{String, Bool}=false,
41+
on_cancel::Union{Nothing, Int}=-1,
42+
header::Union{String, Bool}=false,
4343
keybindings::Vector{Char}=Char[],
4444
kwargs...)
4545
@@ -60,7 +60,7 @@ Any additional keyword arguments will be passed to [`TerminalMenus.Config`](@ref
6060
!!! compat "Julia 1.8"
6161
The `keybindings` argument requires Julia 1.8 or later.
6262
"""
63-
function RadioMenu(options::Array{String,1};
63+
function RadioMenu(options::Array{String,1};
6464
on_cancel=-1, header=false, pagesize::Int=10, warn::Bool=true, keybindings::Vector{Char}=Char[], kwargs...)
6565

6666
length(options) < 1 && error("RadioMenu must have at least one option")
@@ -76,9 +76,9 @@ function RadioMenu(options::Array{String,1};
7676
pageoffset = 0
7777
selected = -1 # none
7878

79-
is_not_legacy = isnothing(on_cancel) || (header != false) || !isempty(kwargs)
79+
is_not_legacy = isnothing(on_cancel) || (header != false) || !isempty(kwargs)
8080

81-
if header == true
81+
if header == true
8282
header = default_radio_header
8383
elseif header == false
8484
header = ""

stdlib/REPL/test/TerminalMenus/custom_header.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ end
4646
menu = MultiSelectMenu(["1st", "b", "c"]; header = false)
4747
output = simulate_input_and_capture_output(menu, 'q')
4848
@test startswith(output, "\e[2K > [ ] 1st")
49-
49+
5050
menu = RadioMenu(["1st", "b", "c"]; warn=false)
5151
output = simulate_input_and_capture_output(menu, 'q')
5252
@test startswith(output, "\e[2K > 1st")
53-
53+
5454
header = TerminalMenus.default_radio_header
5555
menu = RadioMenu(["1st", "b", "c"]; header = true)
5656
output = simulate_input_and_capture_output(menu, 'q')

0 commit comments

Comments
 (0)