Skip to content

Commit 559db22

Browse files
committed
More information in loclist when you searching occurencies.
1 parent 1bd7a1d commit 559db22

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pymode/rope.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ def find_it():
203203
for oc in occurrences:
204204
lst.append(dict(
205205
filename=oc.resource.path,
206+
text=ctx.current[oc.lineno - 1],
206207
lnum=oc.lineno,
207208
))
208209
vim.command('let l:output = %s' % json.dumps(lst))
@@ -367,6 +368,7 @@ def __init__(self, path, project_path):
367368
update_python_path(self.project.prefs.get('python_path', []))
368369

369370
self.resource = None
371+
self.current = None
370372
self.options = dict(
371373
completeopt=vim.eval('&completeopt'),
372374
autoimport=int(vim.eval('g:pymode_rope_autoimport')),
@@ -385,8 +387,9 @@ def __init__(self, path, project_path):
385387
def __enter__(self):
386388
self.project.validate(self.project.root)
387389
self.options['encoding'] = vim.eval('&encoding')
390+
self.current = vim.current.buffer
388391
self.resource = libutils.path_to_resource(
389-
self.project, vim.current.buffer.name, 'file')
392+
self.project, self.current.name, 'file')
390393

391394
if not self.resource.exists() or os.path.isdir(
392395
self.resource.real_path):

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy