Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit60c638d

Browse files
committed
added branch develop to Travis CI build and solved gh issuepython-mode#814 (on the folding jumping problem)
1 parent9b61eab commit60c638d

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

‎.travis.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
# Deactivated.
2-
# This plugin needs a robust test suite.
1+
# Build vim from source with python3 support and execute tests.
32
branches:
43
only:
5-
# - develop
6-
-dev_imp_test
4+
-develop
75
before_install:
86
-export ORIGINAL_FOLDER=$PWD
97
-sudo apt install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev python3-dev lua5.1 lua5.1-dev libperl-dev git

‎autoload/pymode/folding.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ endfunction "}}}
4646

4747
fun!pymode#folding#expr(lnum)"{{{
4848

49-
returnpymode#folding#foldcase(a:lnum)['foldlevel']
49+
letl:return_value=pymode#folding#foldcase(a:lnum)['foldlevel']
50+
51+
returnl:return_value
5052

5153
endfunction"}}}
5254

@@ -138,9 +140,7 @@ fun! pymode#folding#foldcase(lnum) "{{{
138140
let line_block_start=s:BlockStart(a:lnum)
139141
let line_block_end=s:BlockEnd(a:lnum)
140142
let prev_line_block_start=s:BlockStart(a:lnum-1)
141-
let save_cursor=getcurpos()
142143
ifline!~s:blank_regex
143-
callsetpos('.', save_cursor)
144144
if line_block_start== prev_line_block_start
145145
\||a:lnum- line_block_start==1
146146
letl:foldcase='non blank line; first line of block or part of it'

‎ftplugin/python/pymode.vim

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,30 @@ endif
5454

5555
" Python folding
5656
ifg:pymode_folding
57+
" On the folding problem.
58+
" =======================
59+
" What happens when your enter insert mode with fdm=expr:
60+
" TODO:
61+
"
62+
" What happens when your leave insert mode and trigger fdm=expr:
63+
" TODO:
5764

5865
setlocalfoldmethod=expr
5966
setlocalfoldexpr=pymode#folding#expr(v:lnum)
6067
setlocalfoldtext=pymode#folding#text()
6168

69+
70+
au! pymodeInsertEnter*.pysetlocalfoldmethod=manual
71+
au! pymodeInsertLeave*.pylets:save_winview=winsaveview()
72+
73+
au pymodeInsertLeave*.pylets:save_cursor=getcurpos()
74+
au pymodeInsertLeave*.pysetnofoldenable
75+
au pymodeInsertLeave*.pysetlocalfoldmethod=expr
76+
au pymodeInsertLeave*.pysetfoldenable
77+
au pymodeInsertLeave*.pycallwinrestview(s:save_winview)
78+
au pymodeInsertLeave*.pycallsetpos('.',s:save_cursor)
79+
au pymodeInsertLeave*.pycallwinrestview(s:save_winview)
80+
6281
endif
6382

6483
" Remove unused whitespaces

‎readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![](https://travis-ci.org/klen/python-mode.png?branch=develop)
1+
![](https://travis-ci.org/python-mode/python-mode.svg?branch=develop)
22

33
![](https://raw.github.com/python-mode/python-mode/develop/logo.png)
44
#Python-mode, a Python IDE for Vim

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp