Skip to content

Commit 104917e

Browse files
committed
rename variables
1 parent 600e561 commit 104917e

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

autoload/db_ui.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -221,21 +221,21 @@ function! s:dbui.populate_dbs() abort
221221

222222
endfunction
223223

224-
function! s:dbui.populate_item(db) abort
225-
if self.is_group(a:db)
226-
return self.populate_group(a:db)
224+
function! s:dbui.populate_item(item) abort
225+
if self.is_group(a:item)
226+
return self.populate_group(a:item)
227227
endif
228228

229-
return self.populate_db(a:db)
229+
return self.populate_db(a:item)
230230
endfunction
231231

232-
function! s:dbui.populate_group(db) abort
233-
for conn in a:db.connections
232+
function! s:dbui.populate_group(group) abort
233+
for conn in a:group.connections
234234
call self.populate_item(conn)
235235
endfor
236236

237-
if !has_key(self.groups, a:db.key_name)
238-
let self.groups[a:db.key_name] = self.generate_new_group_entry(a:db)
237+
if !has_key(self.groups, a:group.key_name)
238+
let self.groups[a:group.key_name] = self.generate_new_group_entry(a:group)
239239
endif
240240
endfunction
241241

autoload/db_ui/connections.vim

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ function! s:connections.rename_db(db) abort
8888
endif
8989

9090
let connections = self.read()
91-
let parent = self.find_group(a:db.path, connections)
91+
let target_group = self.find_group(a:db.path, connections)
9292

9393
let idx = 0
9494
let entry = {}
95-
for conn in parent
95+
for conn in target_group
9696
if conn.name ==? a:db.name && db_ui#resolve(conn.url) ==? a:db.url
9797
let entry = conn
9898
break
@@ -123,8 +123,8 @@ function! s:connections.rename_db(db) abort
123123
return db_ui#notifications#error(v:exception)
124124
endtry
125125

126-
call remove(parent, idx)
127-
call insert(parent, {'name': name, 'url': url }, idx)
126+
call remove(target_group, idx)
127+
call insert(target_group, {'name': name, 'url': url }, idx)
128128
return self.write(connections)
129129
endfunction
130130

@@ -171,11 +171,11 @@ function! s:connections.rename_group(db) abort
171171
endif
172172

173173
let connections = self.read()
174-
let parent = self.find_group(a:db.path, connections)
174+
let target_group = self.find_group(a:db.path, connections)
175175

176176
let idx = 0
177177
let entry = {}
178-
for conn in parent
178+
for conn in target_group
179179
if conn.name ==? a:db.name && has_key(conn, 'connections')
180180
let entry = conn
181181
break
@@ -197,8 +197,8 @@ function! s:connections.rename_group(db) abort
197197
return db_ui#notifications#error(v:exception)
198198
endtry
199199

200-
call remove(parent, idx)
201-
call insert(parent, {'name': name, 'connections': entry.connections}, idx)
200+
call remove(target_group, idx)
201+
call insert(target_group, {'name': name, 'connections': entry.connections}, idx)
202202
return self.write(connections)
203203
endfunction
204204

0 commit comments

Comments
 (0)