Commit 398e669
authored
feat: add wrap_around option for cursor navigation (#452)
* feat: add wrap_around option for cursor navigation
When enabled (wrap_around = true), the cursor wraps to the opposite end
when reaching the first or last item in the results list, instead of
stopping at the boundary.
This applies to:
- move_up/move_down in insert mode (C-k/C-j, Up/Down, Tab/S-Tab, etc.)
- j/k navigation in normal mode (list buffer)
- Both top and bottom prompt positions
The option defaults to false to preserve existing behavior.
Pagination still takes priority: wrapping only occurs when there are
no more pages to load in the current direction.
* fix: wrap_around takes priority over pagination
When wrap_around is enabled, cursor wraps within the current page
instead of loading the next/previous page. This gives the expected
cycling behavior where Tab at the top jumps to the bottom and
S-Tab at the bottom jumps to the top.
* fix: wrap only at global boundaries, paginate on intermediate pages
Pagination now takes priority over wrap_around on non-boundary pages.
Wrapping only occurs at the true global edges:
- First item on first page → wraps to last item on last page
- Last item on last page → wraps to first item on first page
On all other page boundaries, normal pagination continues as expected.
* fix: stylua formatting and remove wrap_around from FffKeymapsConfig type
- Collapse multi-line callbacks to single-line (stylua)
- Remove wrap_around from FffKeymapsConfig type annotation (belongs only on FffConfig)1 parent 4693adf commit 398e669
2 files changed
Lines changed: 98 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| 203 | + | |
202 | 204 | | |
203 | 205 | | |
204 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
916 | 917 | | |
917 | | - | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
918 | 928 | | |
919 | 929 | | |
920 | 930 | | |
| |||
2048 | 2058 | | |
2049 | 2059 | | |
2050 | 2060 | | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
| 2088 | + | |
| 2089 | + | |
| 2090 | + | |
| 2091 | + | |
| 2092 | + | |
| 2093 | + | |
| 2094 | + | |
| 2095 | + | |
| 2096 | + | |
| 2097 | + | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
| 2105 | + | |
| 2106 | + | |
| 2107 | + | |
2051 | 2108 | | |
2052 | 2109 | | |
2053 | 2110 | | |
2054 | 2111 | | |
2055 | 2112 | | |
2056 | 2113 | | |
| 2114 | + | |
2057 | 2115 | | |
2058 | 2116 | | |
2059 | 2117 | | |
| |||
2064 | 2122 | | |
2065 | 2123 | | |
2066 | 2124 | | |
| 2125 | + | |
2067 | 2126 | | |
2068 | | - | |
2069 | 2127 | | |
2070 | 2128 | | |
2071 | 2129 | | |
2072 | 2130 | | |
2073 | 2131 | | |
2074 | 2132 | | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | 2133 | | |
2080 | | - | |
2081 | 2134 | | |
2082 | | - | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
| 2141 | + | |
| 2142 | + | |
| 2143 | + | |
| 2144 | + | |
| 2145 | + | |
2083 | 2146 | | |
2084 | 2147 | | |
2085 | 2148 | | |
2086 | 2149 | | |
| 2150 | + | |
2087 | 2151 | | |
2088 | 2152 | | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
2089 | 2156 | | |
| 2157 | + | |
| 2158 | + | |
2090 | 2159 | | |
2091 | | - | |
2092 | | - | |
2093 | 2160 | | |
2094 | 2161 | | |
2095 | 2162 | | |
| |||
2119 | 2186 | | |
2120 | 2187 | | |
2121 | 2188 | | |
| 2189 | + | |
2122 | 2190 | | |
2123 | 2191 | | |
2124 | 2192 | | |
2125 | 2193 | | |
2126 | 2194 | | |
2127 | 2195 | | |
2128 | 2196 | | |
| 2197 | + | |
2129 | 2198 | | |
2130 | 2199 | | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
2131 | 2203 | | |
| 2204 | + | |
| 2205 | + | |
2132 | 2206 | | |
2133 | | - | |
2134 | | - | |
2135 | 2207 | | |
2136 | 2208 | | |
2137 | 2209 | | |
2138 | 2210 | | |
2139 | 2211 | | |
2140 | 2212 | | |
2141 | 2213 | | |
| 2214 | + | |
2142 | 2215 | | |
2143 | | - | |
2144 | 2216 | | |
2145 | 2217 | | |
2146 | 2218 | | |
2147 | 2219 | | |
2148 | 2220 | | |
2149 | 2221 | | |
2150 | | - | |
2151 | | - | |
2152 | | - | |
2153 | | - | |
2154 | 2222 | | |
2155 | | - | |
2156 | 2223 | | |
2157 | | - | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
2158 | 2235 | | |
2159 | 2236 | | |
2160 | 2237 | | |
| |||
0 commit comments