<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -30,6 +30,10 @@ Author:  Ciaran McCreesh &lt;ciaran.mccreesh at googlemail.com&gt;
 		:let g:detectindent_preferred_indent = 4
 &lt;       in your |vimrc| file.
 
+	To set limit for number of lines that will be analysed set: &gt;
+		:let g:detectindent_max_lines_to_analyse = 1024
+&lt;	in your |vimrc| file.
+
 ==============================================================================
 3. DetectIndent ChangeLog			      *detectindent-changelog*
 </diff>
      <filename>doc/detectindent.txt</filename>
    </modified>
    <modified>
      <diff>@@ -46,6 +46,10 @@ fun! &lt;SID&gt;DetectIndent()
     let l:has_leading_spaces          = 0
     let l:shortest_leading_spaces_run = 0
     let l:longest_leading_spaces_run  = 0
+    let l:max_lines                   = 1024
+    if exists(&quot;g:detectindent_max_lines_to_analyse&quot;)
+      let l:max_lines = g:detectindent_max_lines_to_analyse
+    endif
 
     let l:idx_end = line(&quot;$&quot;)
     let l:idx = 1
@@ -93,6 +97,13 @@ fun! &lt;SID&gt;DetectIndent()
         endif
 
         let l:idx = l:idx + 1
+
+        let l:max_lines = l:max_lines - 1
+
+        if l:max_lines == 0
+            let l:idx = l:idx_end + 1
+        endif
+
     endwhile
 
     if l:has_leading_tabs &amp;&amp; ! l:has_leading_spaces</diff>
      <filename>plugin/detectindent.vim</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>96c59411a7ba0db9b787ddcff11f0c0d1e44907c</id>
    </parent>
  </parents>
  <author>
    <name>Pauli Nieminen</name>
    <email>suokkos@gmail.com</email>
  </author>
  <url>http://github.com/ciaranm/detectindent/commit/67dd1e5f386b0fafc9126a583690d3fc56deaabc</url>
  <id>67dd1e5f386b0fafc9126a583690d3fc56deaabc</id>
  <committed-date>2009-08-10T15:24:01-07:00</committed-date>
  <authored-date>2009-08-10T11:44:14-07:00</authored-date>
  <message>Limit number of lines that are analysed to improve oepning speed if file is very large.

Default number of lines to analyse is 1024. Default can be changed with g:detectindent_max_lines_to_analyse variable.

Signed-off-by: Pauli Nieminen &lt;suokkos@gmail.com&gt;</message>
  <tree>331c1f9a788bb4daca36ba2db55c40333b92642b</tree>
  <committer>
    <name>Ciaran McCreesh</name>
    <email>ciaran.mccreesh@googlemail.com</email>
  </committer>
</commit>
