Skip to content

Commit f0c74f2

Browse files
committed
rename variables
1 parent 7c75d0f commit f0c74f2

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
@@ -90,11 +90,11 @@ function! s:connections.rename_db(db) abort
9090
endif
9191

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

9595
let idx = 0
9696
let entry = {}
97-
for conn in parent
97+
for conn in target_group
9898
if conn.name ==? a:db.name && db_ui#resolve(conn.url) ==? a:db.url
9999
let entry = conn
100100
break
@@ -127,8 +127,8 @@ function! s:connections.rename_db(db) abort
127127
return db_ui#notifications#error(v:exception)
128128
endtry
129129

130-
call remove(parent, idx)
131-
call insert(parent, {'name': name, 'url': url }, idx)
130+
call remove(target_group, idx)
131+
call insert(target_group, {'name': name, 'url': url }, idx)
132132
return self.write(connections)
133133
endfunction
134134

@@ -175,11 +175,11 @@ function! s:connections.rename_group(db) abort
175175
endif
176176

177177
let connections = self.read()
178-
let parent = self.find_group(a:db.path, connections)
178+
let target_group = self.find_group(a:db.path, connections)
179179

180180
let idx = 0
181181
let entry = {}
182-
for conn in parent
182+
for conn in target_group
183183
if conn.name ==? a:db.name && has_key(conn, 'connections')
184184
let entry = conn
185185
break
@@ -201,8 +201,8 @@ function! s:connections.rename_group(db) abort
201201
return db_ui#notifications#error(v:exception)
202202
endtry
203203

204-
call remove(parent, idx)
205-
call insert(parent, {'name': name, 'connections': entry.connections}, idx)
204+
call remove(target_group, idx)
205+
call insert(target_group, {'name': name, 'connections': entry.connections}, idx)
206206
return self.write(connections)
207207
endfunction
208208

0 commit comments

Comments
 (0)