File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -212,9 +212,6 @@ export async function getbufline(
212
212
lnum : string | number ,
213
213
end ?: string | number ,
214
214
) : Promise < string [ ] > {
215
- if ( end == undefined ) {
216
- return await denops . call ( "getbufline" , expr , lnum ) as string [ ] ;
217
- }
218
215
return await denops . call ( "getbufline" , expr , lnum , end ) as string [ ] ;
219
216
}
220
217
Original file line number Diff line number Diff line change @@ -141,11 +141,7 @@ export async function has(
141
141
feature : string ,
142
142
check ?: boolean ,
143
143
) : Promise < boolean > {
144
- if ( check ) {
145
- const result = await denops . call ( "has" , feature , 1 ) as number ;
146
- return ! ! result ;
147
- }
148
- const result = await denops . call ( "has" , feature ) as number ;
144
+ const result = await denops . call ( "has" , feature , check ) as number ;
149
145
return ! ! result ;
150
146
}
151
147
@@ -187,10 +183,7 @@ export async function getline(
187
183
lnum : string | number ,
188
184
end ?: string | number ,
189
185
) : Promise < string | string [ ] > {
190
- if ( end ) {
191
- return await denops . call ( "getline" , lnum , end ) as string [ ] ;
192
- }
193
- return await denops . call ( "getline" , lnum ) as string ;
186
+ return await denops . call ( "getline" , lnum , end ) as string ;
194
187
}
195
188
196
189
/**
You can’t perform that action at this time.
0 commit comments